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

Js error due to null selection when viewing source via setKeystroke hotkey (patch) #3998

Closed
themanyone opened this issue Apr 22, 2020 · 2 comments
Assignees
Labels
plugin:widget The plugin which probably causes the issue. regression This issue is a regression. status:confirmed An issue confirmed by the development team. type:bug A bug.
Milestone

Comments

@themanyone
Copy link

themanyone commented Apr 22, 2020

Type of report

Bug, patch widget plulgin.js

Provide detailed reproduction steps (if any)

  1. Set up a hotkey for "view source" in config.js
editor1.setKeystroke([
        [ CKEDITOR.CTRL + 13 /*Enter*/, 'source' ],
]);
  1. Press the hotkey

Expected result

No error

Actual result

plugin.js:2921 Uncaught TypeError: Cannot read property '0' of null
at Repository.fixCrossContentSelection (plugin.js:2921)
at Repository.listenerFirer (event.js:144)
at Repository.CKEDITOR.event.fire (event.js:290)
at fireCheckSelection (plugin.js:2952)

Other details

Fix: line 2921: check for null in /widget plugin.js
range = ranges? ranges[ 0 ]:null;

Fix line 292: check for null in /widget plugin.us
if (!this.editor.getSelection()) return;

  • Browser: Chrome latest
  • OS: Linux
  • CKEditor version: 4.15.?
  • Installed CKEditor plugins: widget
@themanyone themanyone added the type:bug A bug. label Apr 22, 2020
@jacekbogdanski jacekbogdanski self-assigned this May 4, 2020
@jacekbogdanski
Copy link
Member

It's the regression introduced in d633573 so between 4.13.0 and 4.13.1.

@jacekbogdanski jacekbogdanski added regression This issue is a regression. status:confirmed An issue confirmed by the development team. labels May 4, 2020
@jacekbogdanski jacekbogdanski removed their assignment May 4, 2020
@f1ames f1ames added plugin:widget The plugin which probably causes the issue. workload:medium and removed workload:medium labels May 4, 2020
@hub33k hub33k self-assigned this May 20, 2020
@f1ames
Copy link
Contributor

f1ames commented Jun 9, 2020

Fixed in cb6f2c4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:widget The plugin which probably causes the issue. regression This issue is a regression. status:confirmed An issue confirmed by the development team. type:bug A bug.
Projects
None yet
Development

No branches or pull requests

4 participants