Opened 8 years ago

Last modified 8 years ago

#14424 confirmed Bug

Refactoring of the Popup plugin

Reported by: Olek Nowodziński Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: Cc:

Description (last modified by Anna Tomanek)


Popup is a utility used internally by various CKEditor plugins. It does the job but it is pretty useless when there's some complex case to handle.

  1. – Popup plugin overrides any geometry passed with options argument. So setting editor.config.fileBrowserWindowFeatures is useless, because whatever width|height|top|left is passed there, it will be discarded anyway.
  1. ( – There is no way to obtain the window handler of the popup. Once it's open, there's no way to customise or control it. DOM does not offer any access to child "popup" windows so the only entry point is the value returned by


  1. There are many possible improvements:

1.1. editor.popup() options argument could be a plain object, which can be iterated. If any property is included, then it's not generated by the Popup plugin (like: width in options? – don't calculate it). Drawback: losing backwards compatibility (changed type of an argument).

1.2. editor.popup() options argument remains string but is parsed to object and, as in 1.1., the plugin is smart when it comes to actually using it. This solution does not break backwards compatibility.

1.3. editor#beforePopup event, which passes all options, which can be intercepted by the listener and customised. It could be an independent feature (unrelated to 1.1. or 1.2.), giving control over any popup window, i.e. not limited to editor.config.fileBrowserWindowFeatures.

  1. The plugin could fire editor#popup event with the reference to the new window in the event data. One could listen to the event and intercept it.

Change History (1)

comment:1 Changed 8 years ago by Anna Tomanek

Description: modified (diff)
Status: newconfirmed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy