Skip to content

Commit

Permalink
change back earlier edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Osman committed Nov 20, 2017
1 parent ef3b420 commit d1fe279
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/modules/init/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@ const addInputEvents = (input: HTMLElement): void => {

/*
* FIXME (this is a bit hacky)
* Set the focus to the input
* Overwrite the submit value with the
* value of the input element ("" or value/defaultValue)
* We're overwriting the default value of confirm button,
* as well as overwriting the default focus on the button
*/
setTimeout(() => {
input.focus();
const defaultValue = (input as HTMLInputElement).value;
setActionValue(defaultValue)
setActionValue('');
}, 0);

};
Expand Down

0 comments on commit d1fe279

Please sign in to comment.