Closed Bug 1792057 Opened 2 years ago Closed 2 years ago

Changing the type of an <input> triggers a blur

Categories

(Core :: DOM: Core & HTML, defect, P2)

Firefox 107
defect

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox105 --- unaffected
firefox106 --- wontfix
firefox107 --- wontfix
firefox108 --- wontfix
firefox109 --- wontfix
firefox110 --- fixed

People

(Reporter: calixte, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached file plop5.html

I'd like to use the date input in pdf.js for pdf forms, but the display of unfocused fields can depend on some embedded scripts, hence the idea to switch from an <input type=date> to <input type=text>, but for any reason, once the type is changed a blur is triggered.
FYI, it works as expected in Chrome.

Hi Adam, would you care to put this into your queue and investigate a bit?

Flags: needinfo?(avandolder)

Yep, for sure. This seems to be a very recent regression; for me the attached test only fails in Nightly, but works the same as Chrome in the current Beta and Release builds.

Flags: needinfo?(avandolder)

Mozregression points to bug 1740989, I know what's going on and fix is trivial, but I need to write a test.

Regressed by: 1740989

Set release status flags based on info from the regressing bug 1740989

The blur is a regression from bug 1740989, but it's really uncovering a
regression from bug 1729342, sorta. Before that, we used to focus the
inner text field on rebuild via focusInnerTextBox().

One could argue that the focus fixup rule should really deal with this,
but I guess since content can't really unattach shadow DOM, it's less of
a general issue and more of an implementation detail.

The test uncovers another pre-existing (annotated) issue. I'll file a
follow-up for that.

Assignee: nobody → emilio
Attachment #9296268 - Attachment description: WIP: Bug 1792057 - Make sure to focus inner text field when creating / rebuilding edit fields in datetime widget. r=sefeng,smaug,avandoler → Bug 1792057 - Make sure to focus inner text field when creating / rebuilding edit fields in datetime widget. r=sefeng,smaug,avandolder
Status: NEW → ASSIGNED
Severity: -- → S3
Priority: -- → P2
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4edc81a94eaa
Make sure to focus inner text field when creating / rebuilding edit fields in datetime widget. r=smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/36293 for changes under testing/web-platform/tests
Backout by ncsoregi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3c3c78eca109
Backed out changeset 4edc81a94eaa for causing multiple failures. CLOSED TREE
Upstream PR was closed without merging

Backed out for causing multiple failures.

Flags: needinfo?(emilio)

Looks like this is too late for 107, attached patch was backed out
Leaving 108 clear, unless anyone thinks we should be following this for a fix in 108?

Attachment #9296268 - Attachment description: Bug 1792057 - Make sure to focus inner text field when creating / rebuilding edit fields in datetime widget. r=sefeng,smaug,avandolder → Bug 1792057 - Make sure to focus inner text field when creating / rebuilding edit fields in datetime widget. r=smaug
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/14c3be47e102
Make sure to focus inner text field when creating / rebuilding edit fields in datetime widget. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Upstream PR merged by moz-wptsync-bot
Regressions: 1812041
No longer regressions: 1812041
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: