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

Calling getCharacterBoundsOnScreen on a paragraph with selection stops the selection being displayed #499

Closed
neilccbrown opened this issue May 5, 2017 · 2 comments

Comments

@neilccbrown
Copy link

If you have a paragraph that features part of the selection, and you call getCharacterBoundsOnScreen, then the selection will no longer be displayed on that paragraph until you change the selection extent, or scroll the paragraph in and out of view (which resets the display). Affects 0.7-M5.

I have the fix for this (pull request coming in a sec) but thought I'd record the issue first.

neilccbrown added a commit to neilccbrown/RichTextFX that referenced this issue May 5, 2017
…raph with selection stops the selection being displayed.

The getCharacterBoundsOnScreen method borrows the selectionShape to do the calculation, but it was only taking a reference to the list beforehand, so the saved "copy" was getting wiped out and thus not restoring the selection properly afterwards.  Simple fix: take copy of the list, not a reference.
@JordanMartinez
Copy link
Contributor

Good catch! (and thanks for opening an issue for it before submitting a PR)

JordanMartinez added a commit that referenced this issue May 5, 2017
Fixes issue #499: calling getCharacterBoundsOnScreen on a paragraph w…
@JordanMartinez
Copy link
Contributor

Closed via #500

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