Repository navigation
Backport 41868 to release/6.0 - #41870
Merged
Merged
Conversation
|
Hi @SteveSandersonMS. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document. |
|
Hi @SteveSandersonMS. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge. To learn more about how to prepare a servicing PR click here. |
Member
Author
|
cc @mkArtakMSFT |
javiercn
approved these changes
May 27, 2022
Member
Author
|
@mkArtakMSFT This can be merged |
Contributor
|
@wtgodbe when will the branches be ready to merge this? Can I merge this now? |
Member
|
Branches will open after we do branding next Tuesday (6/7) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix time/datetime-local binding with seconds when there's no step attribute
Restores the ability to do
<input type=time @bind="someDateTimeVariable">without getting a weird browser warning ifsomeDateTimeVariablehas a non-zero "seconds" component. This used to work in 5.0 but regressed in 6.0.Description
In 5.0, there was explicit JS-side logic to handle the case where an
<input type=time>had nostepattribute (which browsers interpret as "use whole number of minutes - no seconds"). We automatically stripped off any "seconds" part of the formatted string to make it valid as far as the<input type=time>is concerned. This behavior was unintentionally lost in 6.0.Fixes #41731
Customer Impact
Without this change:
DateTimeorTimeOnlyvalues have a zero "seconds" component when used with<input type=time>or<input type=datetime-local>... would find that:
<input type=time>or<input type=datetime-local>would have a nonzero "seconds" component only if they have not been edited by the user, which is pretty oddRegression?
Worked in 5.0
Risk
It is plausible that a 6.0 developer has taken a dependency on this weird behavior. For example, they might be using the
<input type=time>as a readonly value, and be relying on the ability to round-trip a value that includes a nonzero "seconds" part. However:The 5.0 behavior is objectively better, so I have no doubt we should fix this in 7.0. Whether or not we should also patch 6.0 and accept the risk that some developer actually wants the bug is a more ambiguous question.
Verification
Packaging changes reviewed?