Opened 10 years ago

Last modified 10 years ago

#12888 confirmed Bug

Inline editor loses focus/toolbar when dialog with file input on primary tab shown

Reported by: Tyler Owned by:
Priority: Normal Milestone:
Component: UI : Dialogs Version: 4.0 Beta
Keywords: Webkit Blink Cc:

Description (last modified by Jakub Ś)

I've been unable to recreate this on the demo site -- the only input[file] elements in core plugins are on image and link plugins -- both of which appear on the third tab. This problem appears only when the input is on the first tab.

When using the inline editor with Chrome -- if a plugin has a file input on the first tab, when the dialog is shown, the file input element will gain focus -- this has the effect of making ckeditor lose focus and the toolbar will be hidden.

After closing the dialog, the cursor selection is still somewhere in the editor, but the toolbar is still hidden. One must click off the editor and back on to get the toolbar to show up again.

I tried this in FireFox 35, IE11 and Chrome 40 -- Chrome was the only one to exhibit the problem. Also, it seems like timing issue -- if I have dev tools open with a breakpoint in the plugin's onShow function and resume, the problem goes away.


Edit:

  1. Add attached plugin to editor and use attached sample file.
  2. Load sample, click on editor and click on button with no icon.

Result: Dialog with file element loads and toolbar disappears. It is not brought back after closing dialog.

Attachments (2)

test-plugin.js (500 bytes) - added by Tyler 10 years ago.
testplugin.zip (3.1 KB) - added by Jakub Ś 10 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 10 years ago by Jakub Ś

Keywords: file input removed
Status: newpending
Version: 4.4.6

Please provide reduced HTML file (with JS if necessary) that can be put in samples folder of default editor and will show this problem in code.

What you have written looks like implementaion issue and not CKEditor bug thus reduced sample is more than welcome.

NOTE: CKEditor has http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-startupFocus. Have you tried it?

Changed 10 years ago by Tyler

Attachment: test-plugin.js added

comment:2 Changed 10 years ago by Tyler

Regarding the startupFocus configuration option -- I'm not sure if this is relevant. The default is false after all and I haven't set it. Even then, this relates to opening up a dialog with a file input on the first tab -- not the initial loading of the editor.

I've attached a plugin that will show the problem. I copied the inlinebycode.html sample, added, a script tag pointing at this file below the initialization code and modified config.js to include config.extraPlugins = 'testPlugin'.

If you open this file in chrome, select an editor, click the button - note the toolbar disappears. This does not happen in other browsers.

comment:3 Changed 10 years ago by Jakub Ś

Description: modified (diff)
Keywords: Webkit Blink added
Status: pendingconfirmed
Summary: Inline editor loses focus/toolbar when dialog with file input on primary tab shown [Chrome]Inline editor loses focus/toolbar when dialog with file input on primary tab shown
Version: 4.0 Beta

First of all I'm sorry for not understanding your first comment. You were talking about CKEditor dialogs and I understoo that you have CKEditor in some dialog.

Problem can be reproduced from CKEditor 4.0 beta in Blink and Webkit browsers.

Changed 10 years ago by Jakub Ś

Attachment: testplugin.zip added
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