Opened 16 years ago

Closed 11 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 ) )
One fix is to replace the ( e.ctrlKey
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 Artur Formella

Keywords: Confirmed added
Version: FCKeditor 2.6.3FCKeditor 2.4.3
On systems that support one-button mice, context menus are typically opened by pressing and holding the primary mouse button (...)
or by pressing a keyboard/mouse button combination (e.g. Ctrl-mouse click in Mac OS)

(taken from http://en.wikipedia.org/wiki/Context_menu)

comment:2 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: HasPatch added
Milestone: CKEditor 3.0

comment:3 Changed 15 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.0CKEditor 3.x

comment:4 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.x

Milestone CKEditor 3.x deleted

comment:5 Changed 11 years ago by Jakub Ś

Resolution: fixed
Status: confirmedclosed

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.

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