Skip to content

Commit

Permalink
fix(afrim-input): release the textfield on init fail (#41)
Browse files Browse the repository at this point in the history
Now, in case that the afrim-input fail during initialization,
the textfield will be released to permit to the user
to go back to the traditional typing.
  • Loading branch information
pythonbrad authored Sep 6, 2024
1 parent dcc5df0 commit 99a7ff4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/afrim-input/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ export default class AfrimInput {
},
(err) => {
console.error(`Error downloading configuration file: ${err}`);

// We release the textfield
this.textFieldElement.disabled = false;
this.downloadStatusElement.hidden = true;
this.textFieldElement.dataset.lock = "false";
},
);
}
Expand Down

0 comments on commit 99a7ff4

Please sign in to comment.