Skip to content

Hitting return on search page no longer breaks the search

Jonathan Cooper requested to merge EMC-266_return_breaks_search into develop

When the form is submitted via the return key, it is handled by the handleSubmit() handler.

This method now only prevents the default action and does not update the search term in the model.

A moment later the _.debounce() of the handleTyping() handler updates the model, which causes the search to work correctly.

The user will only experience the tiny delay defined in the debounce - which is what all users who don't hit the return key will get.

No change was needed to the search button seen at the righthand side of the search box, since it doesn't seem to trigger a submit, and even if it did it would be handled by the new handleSubmit() method.

Closes EMC-266

Merge request reports

Loading