#2500: Mac: Context menus always disabled with BrowserContextMenuOnCtrl
-------------------------------+--------------------------------------------
Reporter: joshclark | Owner:
Type: Bug | Status: new
Priority: Normal | Milestone:
Component: UI : Context Menu | Version: FCKeditor 2.6.3
Keywords: |
-------------------------------+--------------------------------------------
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 )
}}}
--
Ticket URL: <http://dev.fckeditor.net/ticket/2500>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac