Skip to content

Commit 6b9293d

Browse files
committed
Merge branch 't/10912'
2 parents 14c2a15 + 67b4e78 commit 6b9293d

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CKEditor 4 Changelog
55

66
Fixed Issues:
77

8+
* [#10912](http://dev.ckeditor.com/ticket/10912): Prevent default action when content of a non-editable link is clicked.
89
* [#10913](http://dev.ckeditor.com/ticket/10913): Fixed CKEDITOR.plugins.addExternal not handling paths including file name specified.
910
* [#10666](http://dev.ckeditor.com/ticket/10666): Fixed CKEDITOR.tools.isArray not working cross frame.
1011
* [#10910](http://dev.ckeditor.com/ticket/10910): Fixed error thrown on Internet Explorer 9 in Compatibility Mode.

core/editable.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -514,13 +514,15 @@
514514
// Pass this configuration to styles system.
515515
this.setCustomData( 'cke_includeReadonly', !editor.config.disableReadonlyStyling );
516516

517-
// Prevent the browser opening read-only links. (#6032)
518-
this.attachListener( this, 'click', function( ev ) {
519-
ev = ev.data;
520-
var target = ev.getTarget();
521-
if ( target.is( 'a' ) && ev.$.button != 2 && target.isReadOnly() )
522-
ev.preventDefault();
523-
});
517+
// Prevent the browser opening read-only links. (#6032 & #10912)
518+
this.attachListener( this, 'click', function( evt ) {
519+
evt = evt.data;
520+
521+
var link = new CKEDITOR.dom.elementPath( evt.getTarget(), this ).contains( 'a' );
522+
523+
if ( link && evt.$.button != 2 && link.isReadOnly() )
524+
evt.preventDefault();
525+
} );
524526

525527
// Override keystrokes which should have deletion behavior
526528
// on fully selected element . (#4047) (#7645)

0 commit comments

Comments
 (0)