Opened 5 years ago

Closed 22 months ago

Last modified 22 months ago

#10373 closed Bug (fixed)

Context menu items can be dragged into the editor

Reported by: Alfonso Martínez de Lizarrondo Owned by: Tade0
Priority: Normal Milestone: CKEditor 4.6.2
Component: UI : Context Menu Version: 4.0 Beta
Keywords: Support Cc: rschnorenberg@…

Description

Open the context menu and try to drag one of the items: in Firefox and Chrome works and a link is inserted into the content.

v3 and IE9 work fine.

Change History (14)

comment:1 Changed 5 years ago by Jakub Ś

Status: newconfirmed
Version: 4.04.0 Beta

Problem can be reproduced in Firefox, IE10, Webkit and Opera from CKEditor 4.0 beta.

The worst part is that such behaviour generates error in FF and IE10 when cursor is over link :

ReferenceError: CKEDITOR is not defined
CKEDITOR.tools.callFunction(204,0);
onmouseover

UPDATE: I have checked latest CKEditor 4.5.11 and error in no longer being thrown.

Last edited 2 years ago by Jakub Ś (previous) (diff)

comment:2 Changed 5 years ago by Justin Carlson

I also can reproduce this, it causes some issues with students doing testing. Their specific browser version can crash out / loop when it serializes the data and restores it in a later session (FF10 which nobody should have to care about... but you know how it is).

In addition there doesn't seem to be an easy css fix (I tried a lot of no-select hackery).

Disabling the draggable plugin also does not prevent this interaction. You can still drag menu items into the editor even if you cannot drag the text around.

comment:3 Changed 5 years ago by Justin Carlson

Patch and config option CKEDITOR.config.disableMenuDrag.

This is actually a little hard to do an a per menu item since the initial resize is all done in the focus and setTimeout methods of a floating panel.

https://github.com/UberMeatShield/ckeditor-dev/commit/35fa2b882ac8a3c4e9fefde3cb752f1397fcb4b3

comment:4 Changed 5 years ago by Jakub Ś

Thank you for submitting link to your patch however in order to get your proposed fix tested and applied (if it is correct) please get CKEditor 4 code from https://github.com/ckeditor/ckeditor-dev, prepare your fix and make a "pull request" (here is the example list of pull requests https://github.com/ckeditor/ckeditor-dev/pulls?direction=desc&page=1&sort=created&state=open). In comment please specify link to bug for which this fix was prepared.

NOTE: Dragging menu items into editor isn’t in any way desired so I don't think menu option should be used for it. IMHO it should be blocked permanently. Anyway if this was desired it would have been reported as feature and not a bug ;)

comment:5 Changed 5 years ago by Rick Schnorenberg

Cc: rschnorenberg@… added

comment:6 Changed 3 years ago by Jay

We've found users in production are accidentally using this and the dropped text includes an anchor that leads to unpredictable behavior when clicked such as navigating to about:blank. We've applied the resolution internally, does CKEditor have plans to formally resolve this in future releases?

comment:7 Changed 2 years ago by Jakub Ś

Keywords: Support added

You can also drag and drop items from dropdowns. Just like with menu elements, in CKEditor 4.5.11 errors are not thrown when hovering over such link.

This issue has been reported on our support channel.

comment:8 Changed 2 years ago by Marek Lewandowski

Milestone: CKEditor 4.6.1

comment:9 Changed 2 years ago by Marek Lewandowski

Milestone: CKEditor 4.6.1CKEditor 4.6.2

comment:10 Changed 23 months ago by Tade0

Added disabling draggability as an option active by default.

Changes pushed to branch:t/10373.

comment:11 Changed 23 months ago by Tade0

Owner: set to Tade0
Status: confirmedreview

comment:12 Changed 22 months ago by Marek Lewandowski

Resolution: fixed
Status: reviewclosed

It's still possible to drag the link in ie9, but you're unable to drop it inside the editor, so we're not worried too much about that as since IE10 it works as expected.

For now there's no reason for making menu entries draggable, so let's keep it simple simply always disable dragging for menu options.

Fixed with git:644ba61.

comment:13 Changed 22 months ago by Tade0

For some reason setting draggable=false in Firefox does not cut it.

Added a no-op drag start handler for Firefox.

Changes pushed to branch:t/10373.

comment:14 Changed 22 months ago by Marek Lewandowski

Added some fixes on top of it in git:56157c6dd338c1ccea56766050466d5f0f8c8d2a - merged to master.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy