Hi all,
I have a problem with the onKeyPress() event for user text input elements.
Specifically, when this item is placed in the header, the onKeyPress() event never registers. This is despite the user pressing keys inside of the input element.
This problem does not occur if the input element is moved to the page instead of the header (and the relevant code is moved to the ‘page’ code) - but as I am using this field for a search function, placing it outside of the header is impractical from a design standpoint.
To isolate this problem I have put this simple function in my website’s ‘site’ code, but it fails to work:
export function searchBox_keyPress(event) {
console.log(event);
}
I have also attached an image of the properties panel for the element, so you can verify it is set-up correctly. As you can see, an appropriate event handler has been created.
Anyone else experiencing a similar issue, or have a solution/workaround?
Thanks!
Kate