Skip to content
Permalink
Browse files

Merge branch 't/11306b'

  • Loading branch information...
Reinmar committed May 26, 2014
2 parents 959fe0b + c438e58 commit 6413df419a1c7d5f60a73b5e450b898e706650e8
Showing with 14 additions and 0 deletions.
  1. +1 −0 CHANGES.md
  2. +13 −0 plugins/contextmenu/plugin.js
@@ -7,6 +7,7 @@ Fixed Issues:

* [#11983](http://dev.ckeditor.com/ticket/11983): Fixed: Clicking a nested widget does not focus it. Additionally, performance of the [`widget.repository.getByElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-getByElement) method has been improved.
* [#11960](http://dev.ckeditor.com/ticket/11960): [Blink/Webkit] Fixed: The caret should be scrolled into view on *Backspace* and *Delete* (covers only the merging blocks case).
* [#11306](http://dev.ckeditor.com/ticket/11306): Fixed: [OSX][Blink/Webkit] No widget's entries in context menu on widget right-click.

## CKEditor 4.4.1

@@ -57,6 +57,19 @@ CKEDITOR.plugins.add( 'contextmenu', {
// Cancel the browser context menu.
domEvent.preventDefault();

// Fix selection when non-editable element in Webkit/Blink (Mac) (#11306).
if ( CKEDITOR.env.mac && CKEDITOR.env.webkit ) {
var editor = this.editor,
contentEditableParent = new CKEDITOR.dom.elementPath( domEvent.getTarget(), editor.editable() ).contains( function( el ) {
// Return when non-editable or nested editable element is found.
return el.hasAttribute( 'contenteditable' );
}, true ); // Exclude editor's editable.

// Fake selection for non-editables only (to exclude nested editables).
if ( contentEditableParent && contentEditableParent.getAttribute( 'contenteditable' ) == 'false' )
editor.getSelection().fake( contentEditableParent );
}

var doc = domEvent.getTarget().getDocument(),
offsetParent = domEvent.getTarget().getDocument().getDocumentElement(),
fromFrame = !doc.equals( CKEDITOR.document ),

0 comments on commit 6413df4

Please sign in to comment.
You can’t perform that action at this time.