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

coordsAtPos giving incorrect values #322

Closed
johanneswilm opened this issue Apr 28, 2016 · 1 comment
Closed

coordsAtPos giving incorrect values #322

johanneswilm opened this issue Apr 28, 2016 · 1 comment

Comments

@johanneswilm
Copy link
Contributor

johanneswilm commented Apr 28, 2016

In at least these two situations, the coordinates do not seem correct. The below have come up as issues while trying to find the coordinates of empty ranges.

  1. After the last letter within a blocknode containing severel lines of text. The coordinates given make it appear as if the pos is as high as the entire block (crossing several lines), and as if it's to the right of the block element.
  2. At soft linebreaks. There is an issue with browsers in general, that they don't differentiate between before and after the line break (we are dealing with that), so PM won't be able to deal with this entirely by itself. However, currently coordsAtPos given back values that make it appear as if it is spanning both lines in height. getClientRects() should give give two different rects, and it would be preferable if one would simply chose one rather than trying to combine both with getBoundingClientRect(). Or alternatively allow for some way to return more than one set of coordinates.
@marijnh
Copy link
Member

marijnh commented May 12, 2016

Attached patches seem to help.

@marijnh marijnh closed this as completed May 12, 2016
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

2 participants