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

CTRL + A on selected image moves the caret to the beginning of the editor #465

Mgsy opened this Issue Jun 8, 2017 · 2 comments



Mgsy commented Jun 8, 2017

Steps to reproduce

  1. Open a sample with an image.
  2. Select the image.
  3. Press CTRL + A.

Current result

Selection shows up for a moment, then breaks and the caret moves to the beginning of the editor.



Other information

OS: Windows 10, MacOS X
Browser: Chrome, Safari, Firefox, Edge, Opera
Release: 0.10.0

@Mgsy Mgsy added the type:bug label Jun 8, 2017


This comment has been minimized.


Reinmar commented Jun 21, 2017

That's because when the user presses Ctrl+A the browser creates such a selection:

<div hidden-selection-container>image widget]</div>

And then we remove the hidden selection container because we notice that the fake selection is gone.

I can imagine a couple of solutions:

  • Intercepting the keystroke early and handling it on our own. This will be needed for ckeditor/ckeditor5-image#55 anyway, so maybe we should handle it everywhere just to make it consistent. We'll also need to handle selecting the entire content when widget is the first/last element in the editable (I can't find a ticket for it now ;|).
  • Fixing the selection which ends in/after the hidden selection container when removing it.
  • Some hybrid solution combining intercepting the "select all" action and fixing the selection.

This comment has been minimized.


szymonkups commented Oct 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment