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

[Edge] Selection moves to a block before an image after dragging it to a next block #1079

Closed
Mgsy opened this issue Jun 19, 2018 · 1 comment
Assignees
Labels
type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@Mgsy
Copy link
Member

Mgsy commented Jun 19, 2018

Is this a bug report or feature request? (choose one)

🐞 Bug report

💻 Version of CKEditor

Latest master.

📋 Steps to reproduce

  1. Open the classic editor example in docs.
  2. Change the image to the side image.
  3. Start the selection in the block below the image and move it to the next block.

✅ Expected result

Two blocks are selected.

❎ Actual result

The selection moves to the block above the image.

📃 Other details that might be useful

GIF

bug_cke5

@Mgsy Mgsy added the type:bug This issue reports a buggy (incorrect) behavior. label Jun 19, 2018
@Reinmar Reinmar added this to the iteration 19 milestone Jun 19, 2018
@jodator
Copy link
Contributor

jodator commented Jul 5, 2018

@Reinmar: I was debugging this and I didn't find a reason why although selection is fixed and set to proper new selection it is later changed by either a browser or something else.

The thing is that after selection post-fixer fix the selection that spans over widget (and ends on it) the selection is either wrongly set in the view or the browser "fixes" it so the selection observer detects new selection. It also sets it the collapsed selection at the end of selection (either end of a widget or end of text - when selection starts on widget).

One thing helps a bit: removing contenteditable false/true attribute combination on widgets.

Now the selection "stops" on the widget BUT is properly rendered in the view.

Below are screenshoots of the same salection - starting in paragraph and moving it below the the image:

  1. Current (with selection post-fixer fixes)
    selection_005

  2. As above but without contenteditable=false in the editing area:
    selection_004

Unfortunately in both cases selection stops...

ps.: Oh and also removing contenteditable=false actually fixes the bug described here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

3 participants