ARTICLE AD BOX
At the end of an input element change callback, I'm calling a long-duration computation and want to show a wait cursor. What I've tried is setting document.body.className = 'waiting'; and having in CSS
body.waiting \* {cursor:wait!important;}and then document.activeElement.blur(); and finally calling the long-duration computation (ldc) function inside a setTimeout(ldc,1); so that the screen is redrawn before the computation. (The first line in ldc is document.body.className=''; which of course doesn't take effect until the ldc returns.)
But no cursor is shown during that computation. If I don't do the blur, the caret just shows on the input element. In place of the blur, I've also tried to focus() on a non-input element, but that doesn't seem to work either.
When I do essentially the same thing from a pointerup callback on another element, without the blur, I see the expected wait cursor.
Is there a way to do what I want?
Current code can be found in https://github.com/ms0/docs/blob/main/iax.html (the ldc is "plot") and can be run with https://raw.githack.com/ms0/docs/main/iax.html and I've been testing with integral_0^x 3x^2 so plot takes several seconds. The problem occurs when I change one of the plot limits (the four input elements). [The HELP link at the top pops up the UI description.]
