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

quill.getBounds() returns incorrect position on an empty bullet #765

Closed
sachinrekhi opened this issue Jun 22, 2016 · 7 comments
Closed

quill.getBounds() returns incorrect position on an empty bullet #765

sachinrekhi opened this issue Jun 22, 2016 · 7 comments

Comments

@sachinrekhi
Copy link
Contributor

When you call quill.getBounds() when you are on an empty bullet, it incorrectly returns the location as the beginning of the line instead of to the right of the bullet where the cursor in fact is.

get_bounds

This is a regression from Quill 0.20.1

Steps for Reproduction

  1. Visit beta.quilljs.com
  2. Create a bullet
  3. Indent it
  4. Hit enter

Expected behavior:
getBounds() returns the position of the current cursor, which is to the right of the bullet point

Actual behavior:
getBounds() returns the position at the beginning of the line, which is to the left of the bullet point

Platforms:
Chrome 51 on Mac 10.11

Version:
Quill 1.0 Beta 6

@sachinrekhi sachinrekhi changed the title quill.getBounds() return incorrect position on an empty bullet quill.getBounds() returns incorrect position on an empty bullet Jun 22, 2016
@jhchen
Copy link
Member

jhchen commented Jul 16, 2016

I think f53183f also fixed this issue. Can you confirm?

@sachinrekhi
Copy link
Contributor Author

Sure. What's the best way for me to test pre-release versions of Quill within my app? For my app I normally just use npm to install specific quill releases (ie. npm install [email protected]). I've done Quill development as well via a fork of Quill and just testing within the development Quill test app. But is there a way I can either install the pre-release version via npm or link the development version to my main app?

@jhchen
Copy link
Member

jhchen commented Jul 19, 2016

Just pushed a new beta version so feel free to test the standard way. Otherwise you'd normally have to set up the dev environment and build a local copy.

@sachinrekhi
Copy link
Contributor Author

Ok so you do now get the right bounds for a non-indented bullet in Quill 1.0 Beta 9. But the bounds are still incorrect for multiple-levels of indent. Regardless of whether you indent more, getBounds() is returning the position as if it was a non-indented bullet.

@jhchen
Copy link
Member

jhchen commented Jul 19, 2016

Hmm this seems to be working for me. Are you using the updated stylesheet as well?

@sachinrekhi
Copy link
Contributor Author

Yes, I updated the stylesheet as well.

The specific issue is when the bullet is empty. Take a look at this code pen: http://codepen.io/sachinrekhi/pen/grvZwv

@jhchen
Copy link
Member

jhchen commented Jul 20, 2016

Okay sorry missed the empty detail.

@jhchen jhchen closed this as completed in c66e888 Jul 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants