Page 1 of 1

Jitters

Posted: Wed Dec 14, 2022 7:21 pm
by dunbarx
Attached is a thin field with text in it, that text being fairly large in relation to the height of the field. If you try to select a block of text the field jitters.
Problem goes away if the textSize is smaller or the field height is larger.
Jitters.livecode.zip
(761 Bytes) Downloaded 82 times
Craig

Re: Jitters

Posted: Thu Dec 15, 2022 4:25 pm
by jmburnod
Hi Craig,
I try your jitter stack.
I can see what you discribe when i try to drag the selection only.
When i just select text I don't see jitter effect.
LC 1.0.0 dp1
kind regards
Jean-Marc

Re: Jitters

Posted: Thu Dec 15, 2022 6:44 pm
by dunbarx
Jean-Marc.

Yes, only for dragging a selection.

Just wondering if this means anything to anyone. It is true for any field where the field height - textSize < 9. If the difference is exactly 8, there is mild jitter. It does not matter how many lines are in the field, the "displayed" line will jitter.

Craig

Re: Jitters

Posted: Thu Dec 15, 2022 9:14 pm
by FourthWorld
I would imagine this would occur at any font size when the field height is not greater than the sum of the textHeight + margins.

The engine autoscrolls to selection, and rendering text selection is tricky stuff*. Without sufficient spacing available, it seems the engine's guessing on how to handle that edge is may be suboptimal.

The remedy is simple enough: just provide margins sufficient to meet OS-spec'd defaults and it should be fine. If you find a case where meeting established UI expectations for text size and margins yields the issue I'd recommend filing a bug report.

* Mark Wieder passed me this gem some time ago and it's quite an eye-opener on the challenges of making GUIs text editors:
https://lord.io/text-editing-hates-you-too/

Re: Jitters

Posted: Thu Dec 15, 2022 10:26 pm
by jacque
Mark Wieder passed me this gem some time ago and it's quite an eye-opener on the challenges of making GUIs text editors:
That gave me a renewed respect for text-editor programmers. And for Mark Waddingham, who's done his share of this stuff.