From cb9f597d509e611852bf45db22369aea0cf28caa Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 10 Oct 2013 10:56:03 +0200 Subject: [PATCH] [FIX] http://dev.ckeditor.com/ticket/10912, necessary for image widget edition bzr revid: xmo@openerp.com-20131010085603-dfpxbdqwf4m75osb --- addons/website/static/lib/ckeditor/core/editable.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/website/static/lib/ckeditor/core/editable.js b/addons/website/static/lib/ckeditor/core/editable.js index a7bfb72531c..7a46406da48 100644 --- a/addons/website/static/lib/ckeditor/core/editable.js +++ b/addons/website/static/lib/ckeditor/core/editable.js @@ -580,8 +580,10 @@ // Prevent the browser opening read-only links. (#6032) this.attachListener( this, 'click', function( ev ) { ev = ev.data; - var target = ev.getTarget(); - if ( target.is( 'a' ) && ev.$.button != 2 && target.isReadOnly() ) + var target = ev.getTarget(), + link = new CKEDITOR.dom.elementPath( target ).contains( 'a' ); + + if ( link && ev.$.button != 2 && link.isReadOnly() ) ev.preventDefault(); } );