[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [StrongED] Minor scrolling bug
In message <be556be350.martin@xxxxxxxxxxxxxxxx>
Martin Bazley <martin.bazley@xxxxxxxxxxxxxxxx> wrote:
> (RISC OS 5.14, StrongED 4.69a1)
>
> I've observed this bug a number of times, but I only just figured out
> how to reliably trigger it.
>
> Open a document in StrongED. It must be long enough to have at least
> two 'pages' - i.e. if you click below the scrollbar, it should take you
> to a position above, not at, the bottom of the file.
>
> Move the scrollbar to any position, and double-click and hold in the
> space immediately above or below it.
The problem occurs when the distance from the slider is less than the
height/width of the slider.
> This will cause it to switch very rapidly back and forth between the
> two 'pages' until you release the mouse button. This works for any
> point in the space which the scrollbar would otherwise move into.
It turns out that this is not a bug in StrongED but an interaction
between StrongED's auto-scrolling and the Wimp.
Technical details - for those interested:
The first click of the doubleclick causes a scroll request event to be
sent to StrongED. When StrongED receives the event it scrolls the window
by one page height and sets up for auto-scrolling in the same direction.
The second click does not get reported to StrongED (neither as a scroll
event nor as a mouseclick). The Wimp however does see the mouseclick and
by this time the pointer is over - the now moved - slider so it attaches
the slider to the pointer so that it can be dragged.
Because StrongED hasn't seen the second click it auto-scrolls the window
but the Wimp resets the scroll position because the slider is attached
to the pointer - which hasn't moved (much). This tug of war then goes on
ad infinitum.
The solution I've come up with is to check if auto-scrolling actually
has any effect, ie it changes the scroll position. If it doesn't then
either we can't scroll any further in that direction or the slider has
been attached to the pointer. In both cases we can stop auto-scrolling.
The solution isn't perfect as there's still one bounce before we can
detect this but I suppose that's acceptable.
Cheers,
Fred.
--
StrongED developer
http://www.stronged.iconbar.com/
--
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxxxxx