Skip to content

Commit

Permalink
Merge branch 't/11727' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Mar 27, 2014
2 parents aaddf43 + 5dc6eb8 commit 894f26f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ New Features:
If defined, the editor produces classes instead of inline styles for aligned images.
* Default caption of the image can be translated (customized) with `editor.lang.image2.captionPlaceholder`.

Fixed Issues:

* [#11727](http://dev.ckeditor.com/ticket/11727): Fixed: Editor tries to select non-editable image which was clicked.

## CKEditor 4.3.5

Fixed Issues:
Expand Down
5 changes: 4 additions & 1 deletion core/editable.js
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,10 @@
if ( !CKEDITOR.env.ie ) {
this.attachListener( this, 'mousedown', function( ev ) {
var control = ev.data.getTarget();
if ( control.is( 'img', 'hr', 'input', 'textarea', 'select' ) ) {
// #11727. Note: htmlDP assures that input/textarea/select have contenteditable=false
// attributes. However, they also have data-cke-editable attribute, so isReadOnly() returns false,
// and therefore those elements are correctly selected by this code.
if ( control.is( 'img', 'hr', 'input', 'textarea', 'select' ) && !control.isReadOnly() ) {
editor.getSelection().selectElement( control );

// Prevent focus from stealing from the editable. (#9515)
Expand Down

0 comments on commit 894f26f

Please sign in to comment.