asterics / AsTeRICS

The Assistive Technology Rapid Integration & Construction Set
http://www.asterics.eu
Other
57 stars 27 forks source link

EditBox plugin: Focus lost event should not send data #255

Open deinhofer opened 6 years ago

deinhofer commented 6 years ago

When using the EditBox plugin you can enter text into the text field and when you press 'Enter' the text is sent to the output port.

If you press the 'Tab' key the box looses the focus which also sends the data. The same happens if you click onto a button, e.g. 'Enter' which triggers the event listener of the EditBox to send the data. In such a case sending the data is triggered twice

  1. when focus is lost
  2. when the button is clicked

I generally think it's not useful to send the data when the focus is lost. But to make it backwards compatible, this behaviour should at least be configurable as property. Should we make a property to turn on/off focusLost event?

@ChrisVeigl do you use the focus lost behaviour anywhere?

ChrisVeigl commented 6 years ago

as far as i remember, we had several cases where it was useful to send the data when the focus is lost. i agree it would be good to add a property for configruation (keeping the current behaviour by default)