input element stopped working after change type from date to datetime-local
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
Tracking | Status | |
---|---|---|
relnote-firefox | --- | 106+ |
firefox-esr102 | --- | unaffected |
firefox106 | --- | verified |
firefox107 | --- | verified |
firefox108 | --- | verified |
People
(Reporter: info, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(4 files)
716 bytes,
image/png
|
Details | |
257 bytes,
text/html
|
Details | |
4.60 KB,
image/png
|
Details | |
48 bytes,
text/x-phabricator-request
|
dmeehan
:
approval-mozilla-beta+
RyanVM
:
approval-mozilla-release+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0
Steps to reproduce:
Have this element:
<input name="from" id="from" title="Začátek" value="" type="date" class="input-text required-entry" aria-required="true">
Change type with this jquery code:
$('#from').prop('type', 'datetime-local');
Actual results:
Input element is unusable (attached image).
Expected results:
Element should change type and accept data from user.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Disability Access APIs' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•2 years ago
|
Comment 2•2 years ago
|
||
Thanks for the bug report! I can reproduce something like this. Here's a reduced testcase that triggers the issue for me. In my case, the "test" input ends up collapsing to nearly-nothing (just the "x") after the dynamic tweak.
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Comment 4•2 years ago
|
||
Tiaan tracked down a regression range:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=5af1fe905b87d9b1662b0de9336d2280ccafc73a&tochange=35362dccb42a5e4b39c851f7aa86c8a9e2952a91
...which points to bug 1734221, which indeed changed some localization related stuff around datetime input fields. Maybe there's a race condition and we're failing to look up the localized format/fields here?
(That bug landed for 106, so that means we've shipped this regression to release.)
Updated•2 years ago
|
Updated•2 years ago
|
Comment 5•2 years ago
|
||
Set release status flags based on info from the regressing bug 1734221
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
destructor() should really clean-up after setup(), not the
constructor(), since setup() can be called multiple times.
Assignee | ||
Comment 8•2 years ago
|
||
Comment on attachment 9300291 [details]
Bug 1797139 - Don't null out l10n from destructor(). r=dholbert,Gijs
Beta/Release Uplift Approval Request
- User impact if declined: Fixes layout of datetime <input>s when switching types.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: See test-case attached.
- List of other uplifts needed: none
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Very straight-forward fix.
- String changes made/needed: none
- Is Android affected?: Yes
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 9•2 years ago
|
||
(In reply to info from comment #0)
Thanks for the report. As a workaround, you can set type to text
before datetime-local
. That should avoid hitting the bug.
Comment 11•2 years ago
|
||
bugherder |
Updated•2 years ago
|
I managed to reproduce this issue on a 2022-10-25 Nightly build on Ubuntu 22, using the testcase from Comment 2. Verified as fixed on Nightly 108.0a1(build ID: 20221026224258) on Ubuntu 22, macOS 12, Windows 10.
Comment 14•2 years ago
|
||
Comment on attachment 9300291 [details]
Bug 1797139 - Don't null out l10n from destructor(). r=dholbert,Gijs
Approved for 107.0b6.
Comment 15•2 years ago
|
||
bugherder uplift |
I managed to reproduce this issue on Firefox 107.0b5(build ID: 20221025185841) on Windows 10 using the testcase from Comment 2. Verified as fixed on Firefox 107.0b6(build ID: 20221027185833) on Windows 10, macOS 12, Ubuntu 22.
Comment 17•2 years ago
|
||
Per discussion with RyanVM, let's get this into the next dot release as well.
Comment 18•2 years ago
|
||
Comment on attachment 9300291 [details]
Bug 1797139 - Don't null out l10n from destructor(). r=dholbert,Gijs
Beta/Release Uplift Approval Request
- User impact if declined: Broken layout of datetime <input>s when switching types.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: See test-case attached.
- List of other uplifts needed: none
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Very straight-forward fix.
- String changes made/needed: none
- Is Android affected?: Yes
Comment 19•2 years ago
|
||
Comment on attachment 9300291 [details]
Bug 1797139 - Don't null out l10n from destructor(). r=dholbert,Gijs
Approved for 106.0.4.
Comment 20•2 years ago
|
||
bugherder uplift |
I confirm this fix is verified on Firefox 106.0.4(build ID: 20221102214123) on macOS 12, Windows 10, Ubuntu 22.
Updated•2 years ago
|
Description
•