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

Cursor jumps to the very beginning when switching 'bullet' or 'list formats #461

Closed
csk157 opened this issue Aug 24, 2015 · 3 comments
Closed

Comments

@csk157
Copy link

csk157 commented Aug 24, 2015

Hello, I have noticed a strange issue in Chrome:
quill-bug

When quickly switching bullet or list formats on/off with the mouse slightly moving with over the toolbar button (notice the mouse slightly moving upwards in the recording), the editor's cursor jumps to the beginning of the document. Also happens at slower paces (compared to the gif).

Firefox and Safari do not seem to be affected.

@thomsbg
Copy link
Contributor

thomsbg commented Aug 24, 2015

I can confirm -- it looks like (on the demo page at least) that clicking and dragging anywhere inside the toolbar will move the cursor to the beginning of the document.

@acrylic-origami
Copy link

Related: #415 #456

From what I can tell, the problem is caused by the event that changes the formatting interrupting the execution of a periodic function that would otherwise compensate for the cursor reposition from the editor defocus.

@jhchen jhchen closed this as completed in 6659023 Sep 1, 2015
@jhchen
Copy link
Member

jhchen commented Sep 1, 2015

The problem was very simple: image-tooltip was incorrectly setting the selection to the 0th index when it didn't know what to do. This was more of an issue before quill's internal selection manager kept track of the last known cursor position (useful when a tooltip gets focus and needs to switch back to the last known position when closed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants