Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right clicking on a readonly link causes a TypeError #1181

Closed
NielsNet opened this issue Nov 20, 2017 · 4 comments
Closed

Right clicking on a readonly link causes a TypeError #1181

NielsNet opened this issue Nov 20, 2017 · 4 comments
Assignees
Labels
browser:chrome The issue can only be reproduced in the Chrome browser. good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. regression This issue is a regression. status:confirmed An issue confirmed by the development team. support An issue reported by a commercially licensed client. target:minor Any docs related issue that can be merged into a master or major branch. type:bug A bug.
Milestone

Comments

@NielsNet
Copy link

NielsNet commented Nov 20, 2017

Are you reporting a feature request or a bug?

Bug

Provide detailed reproduction steps (if any)

  1. Open a page with a CKEditor (SDK Sample)
  2. Make it readonly without focussing the editor first
  3. Right-click on a link

Expected result

Nothing

Actual result

A typeerror is thrown in the browser-console:

ckeditor.js:664 Uncaught TypeError: Cannot read property 'checkReadOnly' of undefined
    at Array.<anonymous> (ckeditor.js:664)
    at $.onShow (ckeditor.js:723)
    at Object.onShow (ckeditor.js:29)
    at $.show (ckeditor.js:725)
    at $.open (ckeditor.js:735)
    at $.<anonymous> (ckeditor.js:734)
    at ckeditor.js:27

Other details

  • Browser: Opera, Chrome, MS Edge
  • OS: Windows 10
  • CKEditor version: 4.7.3
  • Installed CKEditor plugins: undefined
@msamsel
Copy link
Contributor

msamsel commented Nov 20, 2017

I was able to reproduce it on Chrome 62 Win7.
Problem wasn't present on Edge and Chrome on MacOS.

@msamsel msamsel added browser:chrome The issue can only be reproduced in the Chrome browser. status:confirmed An issue confirmed by the development team. type:bug A bug. labels Nov 20, 2017
@mlewand mlewand added the target:minor Any docs related issue that can be merged into a master or major branch. label Jan 8, 2018
@mlewand
Copy link
Contributor

mlewand commented Jan 8, 2018

I can also repro it with vanilla CKEditor 4 on http://cdn.ckeditor.com/4.8.0/full/samples/old/readonly.html.

Looks like a regression introduced in 4.4.6.

Fails in http://cdn.ckeditor.com/4.4.6/full/samples/readonly.html

Works on http://cdn.ckeditor.com/4.4.5/full/samples/readonly.html

@mlewand mlewand added regression This issue is a regression. good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. labels Jan 8, 2018
@mlewand mlewand added this to the Backlog milestone Jan 8, 2018
@jacekbogdanski
Copy link
Member

With 4.4.6 version (3048943) we moved initial selection fix from the selection constructor to editable. With this change initial selection fix is executed on the editor focus event, probably removed or replaced by another focus event listener.

@mlewand
Copy link
Contributor

mlewand commented Sep 1, 2018

Fix has been merged to next branch, and will be released in CKEditor 4.10.2.

You can already take a peek at it in our CKEditor preview builds. The simplest way would be to reuse our legacy read-only sample - be sure to press "Make it read-only" button, and then right click the link without focusing the editor.

@mlewand mlewand closed this as completed Sep 1, 2018
@mlewand mlewand modified the milestones: 4.10.2, 4.11.0 Oct 4, 2018
@mlewand mlewand changed the title TypeError on right-click Right clicking on a readonly link causes a TypeError Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser:chrome The issue can only be reproduced in the Chrome browser. good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. regression This issue is a regression. status:confirmed An issue confirmed by the development team. support An issue reported by a commercially licensed client. target:minor Any docs related issue that can be merged into a master or major branch. type:bug A bug.
Projects
None yet
Development

No branches or pull requests

6 participants