4 ms·
I found it interesting behavior and it might be important in the larger picture, thus I'm not sure it's superficial, that's why I put the question mark there. O
by pflanze 4y ago
I found it interesting behavior and it might be important in the larger picture, thus I'm not sure it's superficial, that's why I put the question mark there. Of course I don't mean that this should take away from the appreciation of the language. I'd have made a bug ticket instead if it weren't just much simpler to mention here, also this way I'm not implying that I'm a user and waiting for a resolution.
- recursivedoubts 4y agogood find the code should be updated to: <button _="on pointerdown repeat until event stopCycling set rand to Math.random() * 255 transition *background-color to `hsl($rand 100% 90%)` over 250ms end on pointerup or mouseleave trigger stopCycling"> Click And Hold Me </button> to capture both the pointerup and mouseleave events (seems like some browsers trigger the pointerup event even if the mouse/pointer has left the element) unfortunately right now the `repeat until event` form doesn't take multiple events, so we have to kick out to another event handler to capture both. I'll try to fix that in the next release.