Issue fiddle:
https://codepen.io/WojciechWKROPCE/pen/yLavomN – you can toggle state with mouse click
Observed Behaviour
Inline style CSS value (set with style attribute) for cursor is not updated on render, after second and following state changes.
In example styles are set after first state change correctly, but they aren't updated after next state changes.
You can see actual state change from console.log in render method.
Expected Current Behaviour
CSS value should change after every state update.
Inferno Metadata
Inferno 7.4.6
macOS Big Sur 11.1
Chrome 86.0.4240.111
Hi,
Your codepen example seems to work just fine on my computer, windows 10 chrome v87.
I think this is browser / os related issue rather than inferno js, it seems the html and styles are applied to DOM correctly
@Havunen Thanks for checking.
I just tested it in other browsers and on Windows, and I still see the issue, so I believe it's inferno js.
Just to be sure: you're clicking mouse more than once? After first click the cursor toggles correctly from "normal" to "col-resize", but after next clicks, the inline style remains "col-resize", while the state changes correctly.
Here is a recording of this strange behavior: https://vimeo.com/496259637
It seems similar to #1086
Tested on:
MacOS: Chrome, Firefox
Windows: Chrome, Firefox, Edge
ah yes, I see what you mean now.
I will check it
It seems the provided value "normal" does not work when using
dom.style.setProperty('cursor', 'normal')
Maybe because it does not seem to be standard value based on the specification:
https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
I tested with "initial" and it worked with chrome, maybe you need to use "auto"
@Havunen
Yes, you're right, my bad. It's working with "auto" value.
Thank you very much! :)