Opened 16 years ago
Closed 12 years ago
#2500 closed Bug (fixed)
Mac: Context menus always disabled with BrowserContextMenuOnCtrl
Reported by: | Josh Clark | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Context Menu | Version: | FCKeditor 2.4.3 |
Keywords: | HasPatch | Cc: |
Description
In Firefox 3, and likely in other browsers, too, it's not possible for Macs to access the context menu when FCKConfig.BrowserContextMenuOnCtrl is enabled.
Macs don't have two mouse buttons; without custom hardware, the way that context menus are triggered in OSX is by pressing the ctrl key. Unfortunately, this means that if the FCKConfig.BrowserContextMenuOnCtrl value is set, it *always* blocks the fck context menu on Mac, because e.ctrlKey is always true when the context menu is triggered:
( el._FCKContextMenu.CtrlDisable && ( e.ctrlKey || e.metaKey ) )
e.metaKey ) condition with this: |
( ( e.ctrlKey && !FCKBrowserInfo.IsMac ) || e.metaKey )
That will offer the ctrl-key option for non-Mac systems while allowing the Command-key option for Macs.
My suggestion is to replace lines 101 and 129 (both identical) in fckcontextmenu.js:
if ( el._FCKContextMenu.CtrlDisable && ( e.ctrlKey || e.metaKey ) )
...with this:
if ( el._FCKContextMenu.CtrlDisable && ( e.ctrlKey && !FCKBrowserInfo.IsMac ) || e.metaKey ) )
And replace line 176 of fckcontextmenu.js:
if ( ( fckContextMenu.CtrlDisable && ( ev.ctrlKey || ev.metaKey ) ) || FCKConfig.BrowserContextMenu )
...with this:
if ( ( fckContextMenu.CtrlDisable && ( e.ctrlKey && !FCKBrowserInfo.IsMac ) || e.metaKey ) || FCKConfig.BrowserContextMenu )
Change History (5)
comment:1 Changed 16 years ago by
Keywords: | Confirmed added |
---|---|
Version: | FCKeditor 2.6.3 → FCKeditor 2.4.3 |
comment:2 Changed 16 years ago by
Keywords: | HasPatch added |
---|---|
Milestone: | → CKEditor 3.0 |
comment:3 Changed 16 years ago by
Milestone: | CKEditor 3.0 → CKEditor 3.x |
---|
comment:5 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
When you have two buttons enable on mac you have to press CMD+Right click, when you have one button enabled on MAc you have to press CMD+Ctrl+left click. That way you can get to native menu.
I'm closing this issue as fixed as it works in latest CKEditor 4.1.
(taken from http://en.wikipedia.org/wiki/Context_menu)