Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Placed gecko-specific code together.
  • Loading branch information
mlewand committed Jan 12, 2017
1 parent e4aa802 commit 56157c6
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions plugins/menu/plugin.js
Expand Up @@ -95,21 +95,18 @@ CKEDITOR.plugins.add( 'menu', {
' {ariaChecked}' +
' draggable="false"';

// #10373
if ( CKEDITOR.env.gecko ) {
menuItemSource += ' ondragstart="return false;" ';
}

// Some browsers don't cancel key events in the keydown but in the
// keypress.
// TODO: Check if really needed.
if ( CKEDITOR.env.gecko && CKEDITOR.env.mac )
menuItemSource += ' onkeypress="return false;"';

// With Firefox, we need to force the button to redraw, otherwise it
// will remain in the focus state.
if ( CKEDITOR.env.gecko )
menuItemSource += ' onblur="this.style.cssText = this.style.cssText;"';
// will remain in the focus state. Also we some extra help to prevent dragging (#10373).
if ( CKEDITOR.env.gecko ) {
menuItemSource += ( ' onblur="this.style.cssText = this.style.cssText;"' +
' ondragstart="return false;"' );
}

// #188
menuItemSource += ' onmouseover="CKEDITOR.tools.callFunction({hoverFn},{index});"' +
Expand Down

0 comments on commit 56157c6

Please sign in to comment.