[wp-trac] [WordPress Trac] #23096: Provide callback before setting state of the editor media manager
WordPress Trac
noreply at wordpress.org
Fri Sep 12 06:10:14 UTC 2014
#23096: Provide callback before setting state of the editor media manager
-------------------------+------------------
Reporter: griffinjt | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.1
Component: Media | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+------------------
Comment (by nacin):
We should probably use hyphens for these namespaces.
I'm mostly good with this except that we're solving a bit of an
interesting line of code in the existing callback:
{{{
// Remove focus from the `.insert-media` button.
// Prevents Opera from showing the outline of the button
// above the modal.
//
// See: http://core.trac.wordpress.org/ticket/22445
elem.blur();
}}}
We probably shouldn't expect plugin authors to see this and copy this
over. but also, might there be something else we'll want to always do in
the future?
This is a good use case for firing a custom event inside the callback,
seems like. Or could we suggest they attach an event and call
stopImmediatePropagation? Probably not, as they'd want to set media-
editor.js as a dependency and then it'd load first...
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23096#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list