Bug 137059
Summary: | blur() event called on select causes page to crash | ||
---|---|---|---|
Product: | WebKit | Reporter: | Andrew Hall <fatman> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | webkit |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | iPhone / iPad | ||
OS: | Other |
Andrew Hall
I have identified an issue on iOS 8 that causes the browser to crash and reload the page – not great if you are half way through filling in a form.
This issue can be replicated on some form select (dropdown) elements by changing the value and then clicking the next button (equivalent of tab on Windows.
This causes the page to reload - losing all values and receiving the error message:
"A problem occurred with the webpage so it was reloaded"
This only happens on dropdowns where you try to close the dropdown once a selection has been made via javascript.
Example JQuery Code:
$('select').on('change', function () {
$(this).blur();
});
I worked out that triggering the blur event is the root cause of the issue. I believe this to be a problem where clicking the next button in Safari closes the dropdown box using the blur() event that we specify and then the browser itself tries to close the dropdown box – which no longer exists.
Removing the call to blur() resolves the issue.
The issue does not occur on Chrome on iOS (which I understand uses the same engine under the hood)
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Lucas Forschler
Mass move bugs into the DOM component.