In a HTML5 extension, Photoshop CC 2015 OSX, an input field does not fire any keyboard events for the enter or escape keys.
e.g. no keyup or keypress events. Also no input/textInput" event. All other keys, even modifier keys do fire as expected.
It's not great for a search field if enter does not execute the search.
If you hit either enter or escape when entering text, the extension panel loses focus, and if there is a text field visible anywhere else in the PS GUI it steals the focus.
Has anyone else stumbled across this, or do they have a workaround?
I'm using a workaround with a one-line textarea, as textareas fire events for enter and escape keys.
I set the rows attribute to 1. With CSS, resize is set to "none" and overflow to "hidden".
I use JS to remove newlines from the textarea as soon as they are created.
– This is not ideal but OK.
I'd still be interested on feedback from someone else, e.g. Adobe(?) on this. Is this a bug, or just expected but undocumented behaviour?