-
Notifications
You must be signed in to change notification settings - Fork 47.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created progressValue to be used with <progress /> tags #1437
Created progressValue to be used with <progress /> tags #1437
Conversation
…/> should return component to indeterminate state.
… to 'value'. It seems to be the safest route to affect 'value' and therefore 'position' attributes for the progress DOM element without affecting other DOM elements which rely on the 'value' attribute and its side effects Closes facebook#1431
As I mentioned in chat, it seems bad to introduce a new attribute to fix a local issue (especially when
@danielschonfeld If it absolutely has to be |
@danielschonfeld dug around a bit and it seems that it's there from the very early github commits, do you guys have any idea if it's "truly intentional"? Also I saw @spicyj I had a commit for fixing attributes not being removed when properties where nulled, but that's obviously not happening now? |
We should be able to make The two important things is that we don't set value to the current value if it matches (that causes weird things with the cursor sometimes) and that null turns into an empty input box, not the string "null" (which I think it does in old IE if you do |
Thanks for taking the time to start looking into this. I definitely don't want to do what you did here. @syranide is right - introducing a new property just to fit into our existing set of constraints is bad. We can change our implementation as we find new constraints though. In this case it might be as simple as saying We may also be able to special case properties when they are on certain nodes, maybe for the default values or for the way we handle the setting (attribute vs property). |
While we're here, 2 spaces for indentation, not tabs. (we have an .editorconfig file with that, though I know not many actually use those... yet) |
Nice find. It's a shame that the progress element doesn't unset its I was just about to whip up a |
In case you decide that a wrapper solution is preferable to a mutation method, there's #1443. |
@steveluscher solution eats the cake. I'm closing this PR. |
progressValue seems to be a safer way to go about changing the attribute 'value' for the tag when wanting to distinguish between intermediate and determined statuses.
Where progressValue 0 is a determined state and null is the intermediate state.
This pull request is a product of issue #1431