[wp-trac] [WordPress Trac] #47069: The admin bar on the front end has reduced functionality and bugs when jQuery not being used
WordPress Trac
noreply at wordpress.org
Tue Dec 10 20:17:49 UTC 2019
#47069: The admin bar on the front end has reduced functionality and bugs when
jQuery not being used
-------------------------------------+-------------------------------------
Reporter: afercia | Owner: audrasjb
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.3.1
Component: Toolbar | Version: 5.0
Severity: normal | Resolution:
Keywords: has-screenshots early | Focuses: accessibility,
has-patch 2nd-opinion | javascript
-------------------------------------+-------------------------------------
Comment (by azaozz):
Replying to [comment:73 dinhtungdu]:
> I'm thinking about checking variables before attaching events to them
but it doesn't seem to be the best solution.
Yeah, it's either that or perhaps wrapping the whole thing in a `try {}
catch () {}`. Checking node existence seems cleaner, perhaps? :)
Also not really sure about the `Element.prototype.matches()` polyfill:
https://developer.mozilla.org/en-US/docs/Web/API/Element/matches. It's not
a bad idea, but might bring some compatibility issues eventually? Need to
keep in mind that this will run on the front-end for logged-in users.
Generally the browsers they use should conform to the minimal browser
support for wp-admin (IE11, newer edge, Chromium and Firefox) but having
some "error silencing" for old browsers (to emulate jQuery behaviour) may
be a good idea.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47069#comment:74>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list