Skip to content

Commit

Permalink
Merge branch 't/11306b'
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed May 26, 2014
2 parents 959fe0b + c438e58 commit 6413df4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -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

Expand Down
13 changes: 13 additions & 0 deletions plugins/contextmenu/plugin.js
Expand Up @@ -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 ),
Expand Down

0 comments on commit 6413df4

Please sign in to comment.