Opened 12 years ago
Closed 11 years ago
#28095 closed defect (bug) (fixed)
wpLink modal no longer triggers open event
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.0 | Priority: | normal |
| Severity: | normal | Version: | 3.9 |
| Component: | Editor | Keywords: | has-patch |
| Focuses: | javascript | Cc: |
Description
With the move away from wpdialog in WP 3.9, the wpLink modal no longer triggers an 'open' event.
I was using that event in a plugin to allow users to automatically search using text that was selected in the editor (a similar feature was proposed and reverted in #16276).
Without the event, it's not possible to reliably determine when the wpLink modal is opened in order to interact with it. The attached patch adds a new event to maintain similar functionality with previous versions.
Attachments (2)
Change History (9)
This ticket was mentioned in IRC in #wordpress-dev by DrewAPicture. View the logs.
11 years ago
#5
@
11 years ago
- Milestone changed from 3.9.2 to 4.0
Sounds good. Maybe better if the event is fired on the document or fire triggerHandler (no propagation) on the wrapper?
open: function( editorId ) {
...
$( document ).trigger( 'wplink-open', inputs.wrap );
}
close: function() {
...
$( document ).trigger( 'wplink-close', inputs.wrap );
}
Note: See
TracTickets for help on using
tickets.
Any chance I can get someone to take a look at this for 4.0?