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
Improve visual height and vertical alignment of caret #6
Conversation
Other than that, in all this is a welcome improvement. I'll be happy to land this once the above two things are addressed. :) |
I've addressed all the feedback here (though, it seems push -f destroys the comments). One thing to note, I simply updated the MIN_CARET_HEIGHT_PX to a new hardcoded value, and added comments detailing where this value comes from. There is no conversion utility in master at the moment that I can find, and it seems overkill to make this a non-const for this purpose. I think the comment and renamed variable should hopefully clear it up all up :) |
Implementation makes judicious use of the cursor's selection and getClientRects to compute small adjustments necessary to make the caret more closely match the browser caret positioning. At the moment, each cursor must be re-fixed after any operation that may affect the line height of the caret (e.g., removing a text char may place cursor next to a larger text character) This implementation has been tested with - Forward & backward selections - Wrapped text & white space - Image deletion
Rebased on current master |
Improve visual height and vertical alignment of caret
Thanks for this. Landed! |
retest this please |
this PR brings a regression regarding vertical caret position/size when zoomed in (zoomlevel > 100%) |
(Migrated from https://gitorious.org/webodf/webodf/merge_requests/170)
REVIEWER NOTE: This hasn't been tested in a collaborative setting, though I've attempted to handle the remote cursor scenario as well.
Before and after screenshots showing the differences: https://docs.google.com/file/d/0B1EH5OPb-RrjY1prck93WENtM3c/edit?usp=sharing
Implementation makes judicious use of the cursor's selection and
getClientRects to compute small adjustments necessary to make the
caret more closely match the browser caret positioning.
At the moment, each cursor must be re-fixed after any operation that
may affect the line height of the caret (e.g., removing a text char may
place cursor next to a larger text character)
This implementation has been tested with