code.pyret.org icon indicating copy to clipboard operation
code.pyret.org copied to clipboard

Hovering over multiple test cases flashes the red indicator many times

Open jpolitz opened this issue 11 years ago • 5 comments

When moving the mouse over the test results, if it moves over several that are off-screen, the red "offscreen" indicator flashes many times. It ought to not re-flash if it's already in the middle of it's animation, because if you trigger a dozen flashes, it can sit there flashing even when the mouse has been moved away.

jpolitz avatar May 02 '14 14:05 jpolitz

Yeah, that's a bug I knew about when I prototyped the offscreen indicator. But I just liked the spastic frenzy of it so much... :-p I didn't see an immediately obvious jQuery API to only fade in/out if it's not already visible/hidden or fading in/out, so I left it at that and forgot about it.

blerner avatar May 02 '14 14:05 blerner

Yeah, there's a complete() callback on the animation. Clients have to manage the state themselves, but we ought to be able to build an abstraction for this with like, a single variable.

jpolitz avatar May 02 '14 14:05 jpolitz

Turns out part of the issue is that mouse events are not 100% reliable. There are a lot of them when moving across a warning output, because the warning output is implemented as a collection of small elements. So in a swipe across them, you might get one mouseenter and two mouseleaves, or the other way around. Consequently, any fix that relies on there being an even number won't be reliable. So I added a fadeout time limit to the mix, (as well as a tiny delay to avoid showing the warning when swiping past) and it's in a pull request.

tsgouros avatar May 20 '14 13:05 tsgouros

The error behavior has changed such that this Issue no longer seems to apply. Suggest closing.

schanzer avatar Mar 17 '20 02:03 schanzer

@jswrenn Please confirm and close.

shriram avatar Mar 17 '20 12:03 shriram

@shriram Still not an issue, 3 years later. Jack is gone, but OK to close?

schanzer avatar Jan 11 '24 16:01 schanzer

Happy to do the honors. :-)

jswrenn avatar Jan 11 '24 16:01 jswrenn