Page MenuHomePhabricator

iframe-specific assumptions in other WikiEditor modules
Closed, DeclinedPublic

Description

Found while testing out stuff w/ bug 29328... This iframe-specific code gets called from the WikiEditor toolbar module:

if ( context.$iframe !== undefined ) {
  context.$iframe[0].contentWindow.focus();
}

The actual text insertion is abstracted via jquery.textSelection (but not perfectly -- see bug 29328!) but the focus isn't. Probably needs to be made into a function on the WikiEditor context object, so the iframe extension can override it.

There are probably others...

  • dialogs: explicit code to trigger iframe initialization... seems like this should be pushed back a level so we just tell WikiEditor to load & init the extension if not already loaded?
  • dialogs.config: another focus() hack, and a special keypress binding with the search/replace dialog, which probably just needs to be able to grab an appropriate element to bind on which could then be done generically
  • templateEditor pokes some data stuff on the $iframe, but that may be ok as it's totally dependent on the iframe thing anyway.

Version: unspecified
Severity: normal

Details

Reference
bz29329

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:29 PM
bzimport added a project: WikiEditor.
bzimport set Reference to bz29329.

The unmaintained beta iframe mode was removed from WikiEditor recently in WikiEditor: https://gerrit.wikimedia.org/r/#/c/123649/

Hence closing as WONTFIX.