Skip to content
Advertisement

Can’t edit input text field after window.alert()

I’ve got this Electron app (using NodeJS, Bootstrap, AngularJS) with some text input fields that can be edited. I have a button that triggers a window.alert() After it has been triggered, the text input fields are no longer editable.

Clicking on other elements of the app changes nothing.

Clicking on another application then back on the app fixes the problem. Clicking on one of the text input fields with the Chrome inspector fixes it as well.

These are some of the CSS attributes of my input fields

JavaScript

This is the code for the alert.

The electron popup elerem.dialog.showMessageBox(elerem.getCurrentWindow(), options) is not causing the problem, only the window.alert("Your settings list is up to date");

JavaScript

I expect the message.alert() to not change my text input field’s behavior.

Advertisement

Answer

According to this post on StackOverflow alert is not supported by electron due to it freezing up the threads when executing. While you may be able to call it you may want to see about moving to electron’s dialog or an in page modal (like a MaterialUI or Bootstrap modal) instead if possible.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement