[wp-trac] [WordPress Trac] #26600: Search installed themes input has no submit button
WordPress Trac
noreply at wordpress.org
Tue Mar 31 18:09:25 UTC 2015
#26600: Search installed themes input has no submit button
----------------------------------+----------------------------------------
Reporter: grahamarmfield | Owner: SergeyBiryukov
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 4.2
Component: Themes | Version: 3.8
Severity: normal | Resolution:
Keywords: has-patch dev- | Focuses: accessibility, javascript
feedback |
----------------------------------+----------------------------------------
Comment (by azaozz):
As @afercia points out above, still thinking there are far too many events
attached to the search field:
{{{
'input': 'search',
'keyup': 'search',
'change': 'search',
}}}
So in most browsers we fire the same thing three times for each keystroke.
Why:
- The `change` event may not fire on all changes to the field value and
doesn't work properly in older IE: https://developer.mozilla.org/en-
US/docs/Web/Events/change
- The `keyup` event doesn't fire on non-keyboard input, like mobile auto-
suggest, voice recognition, or even entering emoji on MacOS.
- The `input` event fires all the time in all cases but doesn't work in
IE8: https://developer.mozilla.org/en-US/docs/Web/Events/input
Logically we should not use `change`, and use `keyup` only for IE8 and for
caching the Esc. keystroke.
This applies to all "self submitting" fields, including all autocomplete.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26600#comment:59>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list