-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Selection jiggles as you resize horizontally #745
Comments
b38776d alleviated this somewhat, but it still occurs in this case. |
I haven't found a way to prevent this. Or rather, I have (setting the width instead of the right of the selection divs), but that just pushes the problem to another area -- if you drag a selection from right to left, it's right edge will wobble because of similar rounding inprecisions. See also the discussion in #322. |
Prior to beadea5 lineSpace had a fixed width rather than a min width, which prevented the bug even though the selection div still used right instead of width. That doesn't support the 'widthForcer' fix to #550, but I wonder if there's an alternative fix that would let you go back to a fixed-width lineSpace? E.g. if the cursor width was measured in advance, could that just be taken into account in measureLine() or in the endOperation() code that calls it? |
Another possible angle (not sure whether it works, but I used it to solve a similar single-px wobble in another situation) is to move some of our uses of offsetLeft/offsetTop over to |
One thing to note is that the wobble isn't a single pixel--it appears to be multiple characters' worth, at least on my machine. |
Ah, right, Glenn also mentioned that in the other discussion -- but I never was able to reproduce that. |
FYI - here is the other discussion: #333 It includes a screencast that shows the problem (this is an old screencast, but the steps to repro and results are still the same): |
The trick with Could you double-check that it also works for you? |
Yes, that fixes the problem I was seeing. Thanks! |
Found on Mac in Chrome 21 on Lion.
if (start > goal)
)Result: The selection jiggles during the resize.
The text was updated successfully, but these errors were encountered: