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

Autolink: TypeError: editor.getSelection(...) is null when typing in source view #2756

Closed
SuperPat45 opened this issue Jan 16, 2019 · 2 comments
Assignees
Labels
good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. plugin:autolink The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. target:minor Any docs related issue that can be merged into a master or major branch. type:bug A bug.
Milestone

Comments

@SuperPat45
Copy link
Contributor

SuperPat45 commented Jan 16, 2019

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Enable AutoLink and Source Editing Area plugins
  2. Goto source view
  3. Start typing

Expected result

Autolink must be disabled in source mode

Actual result

These exceptions are thrown:

TypeError: editor.getSelection(...) is null

on firefox

TypeError: Cannot read property 'getRanges' of null

on chrome

In the line:
var matched = CKEDITOR.plugins.textMatch.match( editor.getSelection().getRanges()[ 0 ], matchCallback );

Other details

  • Browser: all
  • CKEditor version: latest
  • Installed CKEditor plugins: AutoLink and Source Editing Area
@jacekbogdanski jacekbogdanski self-assigned this Jan 17, 2019
@jacekbogdanski jacekbogdanski added type:bug A bug. status:confirmed An issue confirmed by the development team. plugin:autolink The plugin which probably causes the issue. labels Jan 17, 2019
@jacekbogdanski
Copy link
Member

I can confirm the issue, thanks for the report!

@jacekbogdanski jacekbogdanski removed their assignment Jan 17, 2019
@engineering-this engineering-this self-assigned this Feb 15, 2019
@mlewand mlewand added target:minor Any docs related issue that can be merged into a master or major branch. good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. labels Feb 18, 2019
@mlewand
Copy link
Contributor

mlewand commented Feb 18, 2019

Closed in #2814.

@mlewand mlewand closed this as completed Feb 18, 2019
@mlewand mlewand added this to the 4.11.3 milestone Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. plugin:autolink The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. 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

4 participants