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

Table selection moved into the topmost element when clicking balloon button #3136

Closed
jacekbogdanski opened this issue May 27, 2019 · 1 comment · Fixed by #3241
Closed

Table selection moved into the topmost element when clicking balloon button #3136

jacekbogdanski opened this issue May 27, 2019 · 1 comment · Fixed by #3241
Assignees
Labels
browser:firefox The issue can only be reproduced in the Firefox browser. plugin:balloontoolbar The plugin which probably causes the issue. plugin:table The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.
Milestone

Comments

@jacekbogdanski
Copy link
Member

jacekbogdanski commented May 27, 2019

Type of report

Bug

Provide detailed reproduction steps (if any)

Reproduction steps are valid for native Firefox visual selection.

  1. Open https://codepen.io/jacekbogdanski/pen/MdXQGd
  2. Open console.
  3. Select some table cells.
  4. Click balloon button (empty one).

Expected result

Range logged by console reflects the visual selection.

Actual result

The range is moved into the topmost element inside the editable element. You will also see cleaned FF visual selection.

It looks like natively range is not lost during operations on clickable elements outside contenteditable: https://codepen.io/jacekbogdanski/pen/mYKxGv

The issue is also reproducible with an inline editor (divarea), although the selection is kept inside the first cell of the table.

Other details

  • Browser: Firefox
  • CKEditor version: at least 4.10.0
@jacekbogdanski jacekbogdanski added type:bug A bug. status:confirmed An issue confirmed by the development team. browser:firefox The issue can only be reproduced in the Firefox browser. plugin:table The plugin which probably causes the issue. plugin:balloontoolbar The plugin which probably causes the issue. labels May 27, 2019
@f1ames f1ames added this to the 4.12.1 milestone May 27, 2019
@f1ames f1ames modified the milestones: 4.12.1, 4.13.0 Jun 26, 2019
@engineering-this engineering-this self-assigned this Jul 1, 2019
@engineering-this
Copy link
Contributor

In case of iframe editors it is an upstream
https://bugzilla.mozilla.org/show_bug.cgi?id=1562905

For inline editors selection is stored on blur/focusout and restored on focus/focusin.

https://github.com/ckeditor/ckeditor-dev/blob/9cb74b35db7082189088f47326eb05b02c947f8d/core/selection.js#L803-L817

However when restoring it is wrongly turned into fake selection when tableselection plugin is missing:

https://github.com/ckeditor/ckeditor-dev/blob/9cb74b35db7082189088f47326eb05b02c947f8d/core/selection.js#L1919-L1927

When restoring selection is fixed for inline editors same logic could be used to workaround upstream issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser:firefox The issue can only be reproduced in the Firefox browser. plugin:balloontoolbar The plugin which probably causes the issue. plugin:table The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.
Projects
None yet
3 participants