Opened 7 years ago

Closed 6 months ago

#7856 closed Bug (fixed)

Built-in contextMenu doesn't behave correctly

Reported by: dittodhole Owned by:
Priority: Normal Milestone:
Component: UI : Context Menu Version: 3.5.3
Keywords: Firefox Cc:

Description (last modified by Wiktor Walc)

Doing a right-click does show the built-in contextmenu, but when doing a second right-click, it hides, instead of popping up again at the actual mouse-position.

For a sample HTML content that can be used to reproduce the error, check #8006.

Attachments (1)

click.png (19.6 KB) - added by Jakub Ś 6 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 7 years ago by dittodhole

Summary: Built-in contextMenu doesn't behave correctBuilt-in contextMenu doesn't behave correctly

comment:2 Changed 7 years ago by Jakub Ś

Status: newpending

Which browser and OS are you using and did you reproduce the issue in clean version of CKEditor?

I have checked this issue for CKEditor 3.6 on every browser in XP ,Win7 and Ubuntu but menu showed up on every right click.

comment:3 Changed 7 years ago by dittodhole

sorry, i forgot to mention that ... tested with ckeditor 3.6 (with jquery-adapter in use - but nothing else) on win7 + ff 4.0.1

demo: http://jsfiddle.net/rJD65/ just doing right-clicks on the text ...

Last edited 7 years ago by dittodhole (previous) (diff)

comment:4 Changed 7 years ago by Jakub Ś

Keywords: Firefox4 added
Status: pendingconfirmed
Version: 3.63.5.3

Menu doesn't show on first click because of JS Error:

this.getWindow().$.getComputedStyle(this.$, "") is null
/3.6/ckeditor/_source/core/dom/element.js
Line 502

It’s hard to reproduce it. I have:

  1. opend jquery adapter sample.
  2. at the same time clicked RMB at the end of the sample text and swung (from right to left) with a mouse like I wanted to select whole text. It was a very small swing – I have begun at the end of the sample text and stopped in the middle of the word text. I could only reproduce this issue in FF4 from CKEditor 3.5.3 rev [6606]
  3. If you make a stronger swing so that you get out of editor you will get two different errors which are reproducible from version 3.3.2:

target.getOuterHtml is not a function
3.6/ckeditor/_source/plugins/wysiwygarea/plugin.js
Line 682

ev.getTarget().is is not a function
3.6/ckeditor/_source/plugins/wysiwygarea/plugin.js
Line 682

I didn’t get any unexpected results when simply clicking behind the sample text with RMB.

"but when doing a second right-click, it hides" - I assume that menu shows quickly and then hides. I have also observed something like this but this is rather the result of JS error.

comment:5 Changed 7 years ago by dittodhole

@j.swiderski:

you are correct with "I assume that menu shows quickly and then hides"!

comment:6 Changed 6 years ago by Wiktor Walc

Description: modified (diff)

#8006 was marked as duplicate.

comment:7 Changed 6 years ago by Jakub Ś

Keywords: Firefox added; Firefox4 removed

#8578 has been marked as duplicate.

Conclusions from #8578 which help tp better understand the issue:

instead have the one for Firefox display when people right click.

This is a key to the whole bug.

To reproduce:

  1. Open replacebycode sample
  2. scroll down to the bottom of the page (second editor should be visible)
  3. Right-click at height of sample text line (See click.png)

Result: Error will pop out

It is the easiest to reporduce this bug in FF4. I have also tried in FF8 but in that browser the bug has been reproducible from CKEditor 3.5.4.

The version and error for the bug stays the same but it seems that this bug is reproducible in Firefox4 and above and not only in Firefox4 as stated before.
Firefox 3.6 works fine.

Last edited 6 years ago by Jakub Ś (previous) (diff)

comment:8 Changed 6 years ago by Jakub Ś

User @SSchmitz99 (in #8578) suggests changing the code from

return this.getWindow().$.getComputedStyle( this.$, ).getPropertyValue( propertyName );

to

return this.getWindow().$.getComputedStyle( this.$, ) ? this.getWindow().$.getComputedStyle( this.$, ).getPropertyValue( propertyName ) : null; 
}}
as it hepled in his case. 

IMHO this is rather a temporarily workaround and not solution to the cause of the problem. 
Last edited 6 years ago by Jakub Ś (previous) (diff)

Changed 6 years ago by Jakub Ś

Attachment: click.png added

comment:9 Changed 6 years ago by Jakub Ś

Another TC this time without jQuery.

To reproduce:

  1. Open replace by code sample
  2. Switch to source and pase in the below code
    <table border="1" cellpadding="1" cellspacing="1" style="width: 500px">
    	<tbody>
    		<tr>
    			<td>
    				<img alt="" src="http://a.cksource.com/c/1/inc/img/opensource-110x95.gif" style="width: 102px; height: 77px" /></td>
    			<td>
    				&nbsp;</td>
    		</tr>
    		<tr>
    			<td>
    				&nbsp;</td>
    			<td>
    				&nbsp;</td>
    		</tr>
    		<tr>
    			<td>
    				&nbsp;</td>
    			<td>
    				&nbsp;</td>
    		</tr>
    	</tbody>
    </table>
    
  3. Switch to WYSIWYG mode
  4. Right-click on image inside table - Error will be thrown.

This TC has been reproducible in Firefox4-10.
*In FF4 from CKEditor 3.5.3 rev [6606].

  • Strange - In FF10, this error can be observed in release version only in CKEditor 3.6.2, in revisions from rev [7013] (CKEditor 3.6.1). At least those are the rusults I've got.
Last edited 6 years ago by Jakub Ś (previous) (diff)

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

Hi guys!

I've encountered the same issue (or issues) while doing manual tests for latest trunk (r7439). I've seen them in many TTs like 4041/1, 4594/1, 5778/1. Typical scenario was:

  1. Right click somewhere inside the editor.
  2. See two errors:
    target.getOuterHtml is not a function
    http://ckeditor3.t/ckeditor/_source/plugins/wysiwygarea/plugin.js
    Line 685
    ev.getTarget().is is not a function
    http://ckeditor3.t/ckeditor/_source/plugins/wysiwygarea/plugin.js
    Line 685
    

I tried to reproduce the same issue in _samples/replacebyclass.html and I got a different results. I was copying editor's contents from TTs to that sample, but I couldn't get the same errors.

However I confirm that I was able to reproduce issue pointed in click.png and that it's reproducible from 3.5.3. But there's different error:

this.getWindow().$.getComputedStyle(this.$, "") is null
http://localhost/cksource/CKEditor/trunk/_source/core/dom/element.js
Line 502

So I think that these two issues are separate things. However this needs further investigation.

comment:11 Changed 5 years ago by Leandro

Hi,

I was receiving the same error today:

target.getOuterHtml is not a function

ev.getTarget().is is not a function

but the error was only ocurring in firefox, ckeditor was working fine in chrome.

As I know firefox is an amazing browser, I supposed that the problem wasn't in firefox but may be in one of the addons or plugins. So, I restarted firefox in safe mode and ckeditor worked nice. Playing with the addons I discovered that the extension causing the problem was Multi Links by Grizzly Ape.

So, maybe the problem with all of you is just some extension that needs to be deactivated because is causing conflict with ckeditor.

Regards

Last edited 5 years ago by Jakub Ś (previous) (diff)

comment:12 Changed 6 months ago by Jakub Ś

Resolution: fixed
Status: confirmedclosed

Both me and @k.krzton could not reproduce this problem in latest CKEditor 4.6.2 thus I'm marking it as fixed.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy