$location.search() in conjunction with routing causes lost keypress events #15084
Description
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
http://plnkr.co/edit/nY4wbAtpOlSvkUiVsoC3
When typing into an input box that performs a search and reloads a routeable controller, keypress events are lost. This issue only occurs in Firefox and only when a route controller is reloaded.
The easiest way to recreate is to type 1 through 9 very quickly into the input box. You may need to adjust the slowdown variable to recreate the issue depending on the performance of your machine.
You can fix the issue by setting reloadOnSearch to false.
Another interesting thing is that when I add a plain javascript event listener to the input box, it doesn't get keypress events either. Maybe event.stopImmediatePropagation in angular is the culprit?
What is the expected behavior?
It may be slow but you should eventually see all the characters you typed in both the input box and the url.
What is the motivation / use case for changing the behavior?
We have an input box that enables users to filter data on a screen. The search query string gets put into the url so it can be shared.
Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular?
- Angular 1.4.8 and Angular 1.5.8/Firefox 48/Windows 10
- Angular 1.4.8 and Angular 1.5.8/Firefox 48/Ubuntu 16.04.1 LTS