Opened 9 years ago

Last modified 8 years ago

#14540 confirmed New Feature

Opening native context menu on a link & selecting "Open Link" results in new page loaded in content area — at Version 4

Reported by: Satya Minnekanti Owned by: Jakub Ś
Priority: Normal Milestone:
Component: General Version:
Keywords: IBM Cc: chrisgui, Irina

Description (last modified by Jakub Ś)

Steps to reproduce

  1. Open nightly build http://nightly.ckeditor.com/16-03-22-07-07/full/samples/
  2. Keep cursor inside link(CK Editor)
  3. use CMD + Right click to ope Browser context menu
  4. Click on Open Link in Browser context menu

Expected result

EDIT: Since we can't change browser behaviour, there should be dialog displayed (fired on beforeunload event) asking if user wants to leave the page or not.

Actual result

Entire CKEditor content area is replaced by the CKEditor page and can't go back to editor body or click on any options in toolbar.

Other details (browser, OS, CKEditor version, installed plugins)

Safari, OS MAC

Change History (4)

comment:1 Changed 9 years ago by Jakub Ś

Description: modified (diff)
Owner: set to Jakub Ś
Status: newassigned
Version: 4.5.7

I don't quite see area for improvement here.

CKEditor content area is in iframe (it is a different document) and we deliberately select "Open link" option and not "Open Link in New Window". How are we supposed to stop this from happening? I personally don't know. Link is opened from native context menu which sees content area as document with it should replace with this link.

The only thing that comes to my mind is some sort of custom back button but that would be a feature request and issue is in fact IMHO such a weird and rare case that we would probably never have time to implement this feature.

@m.lewandowski what do you think?

comment:2 Changed 9 years ago by Jakub Ś

Status: assignedpending

comment:3 Changed 8 years ago by Marek Lewandowski

Context menu behavior is a native and we can't customize it.

However one way to prevent this kind of confusion is to use window's beforeunload event, to display a confirmation dialog with an information like "You're about to replace the CKEditor, are you sure you want to continue?" or sth among these lines.

But honestly, only Safari has that kind of a feature in convext menu (I mean to open in the same tab), and it makes it low priority for us.

Definitely needs to be changed to feature request.

@j.swiderski can I ask you to check whether Safari still has an option to open link in the same tab? They might have removed it since that time. If it still has, just change the ticket type, status and update title + description based on expected behavior above.

comment:4 Changed 8 years ago by Jakub Ś

Description: modified (diff)
Status: pendingconfirmed
Summary: Safari: Opening browser context menu on a link & selecting Open Link option making editor unusableOpening native context menu on a link & selecting "Open Link" results in new page loaded in content area
Type: BugNew Feature

This option is still available in latest Safari.

There is an extra problem with opening new link in editor body. When you are on nightly and you are trying to load ckeditor.com you are getting Refused to display 'http://ckeditor.com/' in a frame because it set 'X-Frame-Options' to 'SameOrigin'.. This is happening because most likely our server is set to its default SAMEORIGIN - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options (checkout in Apache section).
This causes a series of problems because when you hover over editor area, you are getting a ton of errors saying Sandbox access violation: Blocked a frame at "http://nightly.ckeditor.com" from accessing a frame at "http://nightly.ckeditor.com". The frame being accessed is sandboxed and lacks the "allow-same-origin" flag.. When you try to press any button you are getting this.document.getWindow().$.getSelection is not a function. (In 'this.document.getWindow().$.getSelection()', 'this.document.getWindow().$.getSelection' is undefined). All this makes editor not usable after attempting to open a link.

Unfortunately all the above is beyond editor control. As @m.lewandowski has pointed out we can only warn user with the dialog but if he decides to open the page anyway he will lose editor contents.

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