code.pyret.org
code.pyret.org copied to clipboard
Hovering over multiple test cases flashes the red indicator many times
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.
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.
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.
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.
The error behavior has changed such that this Issue no longer seems to apply. Suggest closing.
@jswrenn Please confirm and close.
@shriram Still not an issue, 3 years later. Jack is gone, but OK to close?
Happy to do the honors. :-)