Opened 10 years ago

Last modified 10 years ago

#11365 confirmed Bug

Blink crashes if right clicking on mapped image

Reported by: Alfonso Martínez de Lizarrondo Owned by:
Priority: Normal Milestone:
Component: UI : Context Menu Version: 3.6.6
Keywords: Blink Cc:

Description (last modified by Piotrek Koszuliński)

Set allowed content to true and then insert an image map in the content:

<img alt="" src="assets/sample.jpg" usemap="#imgmap201414175321zz" />
<map id="imgmap201414175321zz" name="imgmap201414175321zz"><area coords="5,5,155,195" href="page.html" shape="rect" /></map>

Now right click on the map with the developer tools open and the tab will crash in Chrome. Adding a check in the tabletools plugin seems to be enough:

From

editor.contextMenu.addListener( function( element, selection, path ) {
	var cell = path.contains( { 'td': 1, 'th': 1 }, 1 );
	if ( cell && !cell.isReadOnly() ) {

To

editor.contextMenu.addListener( function( element, selection, path ) {
	var cell = path && path.contains( { 'td': 1, 'th': 1 }, 1 );
	if ( cell && !cell.isReadOnly() ) {

Despite this patch, I've already filed a ticket in Chrome, but this patch will avoid getting the error. https://code.google.com/p/chromium/issues/detail?id=331664

Related issue: #11308.

Attachments (1)

11365.html (1.4 KB) - added by Olek Nowodziński 10 years ago.
Sandbox

Download all attachments as: .zip

Change History (10)

comment:1 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Description: modified (diff)

comment:2 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Please, note that this seems to avoid the crash only in inline editing, the iframe crashes more often, but at least it's a start.

comment:3 Changed 10 years ago by Jakub Ś

Keywords: Blink added
Status: newconfirmed
Summary: Chrome crashes if right clicking on mapped imageBlink crashes if right clicking on mapped image

@alfonsoml original problem you mention can be reproduced from CKEditor 3.0 and this is indeed a browser bug because it doesn't need editor to crash browser (same thing happens in contenteditable).

  1. IMHO It would be good idea to add this workaround until Chrome fixes this issue on its side.
  2. There is however CKE specific issue that can be reproduced from CKEditor 4.0 beta. To reproduce it:
  • use full package
  • set allowedContent:true,
  • insert code provided by @alfonsoml,
  • switch to wysiwyg
  • right-click on image

comment:4 Changed 10 years ago by Jakub Ś

Milestone: CKEditor 4.3.2

comment:5 Changed 10 years ago by Olek Nowodziński

Owner: set to Olek Nowodziński
Status: confirmedassigned

comment:6 in reply to:  3 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Replying to j.swiderski:

@alfonsoml original problem you mention can be reproduced from CKEditor 3.0 and this is indeed a browser bug because it doesn't need editor to crash browser (same thing happens in contenteditable).

Yes, of course a crash is always a severe browser bug, and that's why I first reported it to them and only wrote this ticket in order to fix a little issue, but it doesn't really fix the problem.

The strange thing in your comment is the part that it also happens in plain contenteditable because that seemed to work fine in my tests and so I had to provide a complex testcase with all the core of CKEditor. I might try again to reproduce it in order to provide them a simplified testcase.

Changed 10 years ago by Olek Nowodziński

Attachment: 11365.html added

Sandbox

comment:7 Changed 10 years ago by Olek Nowodziński

Milestone: CKEditor 4.3.2
Owner: Olek Nowodziński deleted
Status: assignedconfirmed
Version: 4.3.13.6.6 (SVN - trunk)

Unfortunately, the solution proposed by the author is not valid. The issue has nothing to do with Tabletools plugin and can be reproduced with config.plugins = 'wysiwygarea,contextmenu' (see attached sandbox). Everything is up to Chrome dev team in such case.

comment:8 Changed 10 years ago by Piotrek Koszuliński

I confirm this. Adding a check does not help.

Another user reported us a similar issue #11380 but with select elements.

comment:9 Changed 10 years ago by Piotrek Koszuliński

Description: modified (diff)
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy