Ticket #4533 (confirmed Bug)
Opera: double-clicking undo/redo UI button can open "hotclick" context menu due to selection being restored by the editor
| Reported by: | wwalc | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | Core : Undo/Redo | Version: | SVN (CKEditor) - OLD |
| Keywords: | Opera | Cc: | hallvord@… |
Description
To reproduce:
- Open CKEditor, type "This is some sample text"
- Make "This", "some" and "text" bold (to be sure that more than one action can be undone)
- Click Undo 3 times then just click randomly Redo and Undo
- Result:
- browser's context menu is opened in the left corner of the browser
Attachments
Change History
comment:1 Changed 4 years ago by garry.yao
- Version set to SVN (CKEditor)
- Component changed from General to Core : Undo/Redo
- Milestone set to CKEditor 3.x
comment:2 Changed 3 years ago by fredck
- Milestone CKEditor 3.x deleted
Milestone CKEditor 3.x deleted
Changed 3 years ago by krst
- Attachment krst_13.46.06.png added
Confirmed for Opera 10.61.3484, CKE 3.4.1 Trunk
comment:3 Changed 3 years ago by garry.yao
The selection restoring is what makes Opera crazy, but we're not doing anything wrong here, so let's ask Opera for their opinion.
comment:5 Changed 3 years ago by hallvord@…
This is not the normal context menu, it's the "hotclick" menu that opens when you double-click something (contains commands that you would typically use on a selection). So if there is a selection when you "finish" two clicks that Opera thinks is a double click, it will appear.
It should be possible to avoid it with preventDefault() (though we've had a bug in the past that made it impossible and I'm not sure if that is fixed, need to look that up).
At least now you know why restoring a selection can cause a context menu :)
comment:6 Changed 3 years ago by hallvord@…
BTW looked up the double click preventDefault() bug and it appears fixed. So you should be able to work around this if you choose to do so..:
document.addEventListener('dblclick', function(e){e.preventDefault()}, false);
- though it would be user-friendlier to add it just on the element that contains the buttons, and not block double-click menu on the entire document.
comment:7 Changed 2 years ago by hallvord@…
- Summary changed from Opera: clicking on a redo/undo button opens context menu to Opera: double-clicking undo/redo UI button can open "hotclick" context menu due to selection being restored by the editor
Still an issue
comment:9 Changed 2 years ago by fredck
Replying to hallvord@…:
I guess we should also consider not popping up the Hotclick menu if you double-click unselectable elements (assuming that the buttons are marked unselectable - right?)
This looks like a nice approach for it... we're not really dealing with double-click there, but with two single-clicks. It would be nice to have Opera understanding it.
comment:10 Changed 2 years ago by hallvord@…
Reported DSK-338779 internally to suggest this.

That's weird ;)