<input type=date> seems to show selection pop up even when tab is changed

VERIFIED FIXED in Firefox 54

Status

()

VERIFIED FIXED
2 years ago
2 years ago

People

(Reporter: kaartic, Assigned: scottwu)

Tracking

(Blocks: 1 bug)

54 Branch
mozilla54
Points:
---

Firefox Tracking Flags

(firefox54 verified)

Details

Attachments

(3 attachments)

(Reporter)

Description

2 years ago
Created attachment 8830633 [details]
Screenshot showing the selector for <input type=date>

I tried to use the <input type=date> tag after enabling it using dom.forms.datetime . It looks good, but it seems that when the pop-up for selecting date is visible and when I switch to another tab "using the shortcut" Ctrl+Tab, the pop-up doesn't close instead it is shown in the new tab where it isn't relevant and also partially hiding the contents of the new tab. (see screen shots). 

Browser : Nightly 54.0a1

Steps to reproduce:
0. Enable the newly added "date" type for input tag from about:config by setting the dom.forms.datetime to true
1. Open a HTML document with <input type=date> in it
2. Click the input box to open up the date selector
3. Switch to another tab using "Ctrl+tab"

Expected behaviour:
The date selector is closed

Actual behaviour:
The selector window is shown even in the new tab where the corresponding input field isn't present
(Reporter)

Comment 1

2 years ago
Created attachment 8830634 [details]
Screenshot showing the selector for <input type=date> in switched tab
Comment hidden (mozreview-request)
(Assignee)

Comment 3

2 years ago
Thanks for reporting this bug Kaartic!

I think all it takes is adding `tabspecific="true"` to the datetime panel:
http://searchfox.org/mozilla-central/rev/bf98cd4315b5efa1b28831001ad27d54df7bbb68/browser/base/content/browser.js#1470

Would you be able to take a quick look Mike? A similar issue happens to <select> dropdown as well. I'll file a bug if it's not reported already.
Assignee: nobody → scwwu
Flags: needinfo?(mconley)
Component: General → XUL Widgets
Product: Firefox → Toolkit
Blocks: 1323674

Comment 4

2 years ago
mozreview-review
Comment on attachment 8830648 [details]
Bug 1334038 - datetime pickers should close on tab switch

https://reviewboard.mozilla.org/r/107388/#review109284

Looks good, thanks!
Attachment #8830648 - Flags: review?(mconley) → review+
Hey scottwu, thanks for the patch. For future reference, just the r? flag is fine. The additional needinfo? is not required. :)
Flags: needinfo?(mconley)
(Assignee)

Comment 6

2 years ago
Got it. Thanks Mike!
Keywords: checkin-needed

Comment 7

2 years ago
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4057a8f658fc
datetime pickers should close on tab switch r=mconley
Keywords: checkin-needed

Comment 8

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/4057a8f658fc
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox54: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Verified as fixed using the latest Nightly 54.0a1 (2017-02-28) on Windows 10 x64, Ubuntu 16.04 and Mac OS X 10.11.
Status: RESOLVED → VERIFIED
status-firefox54: fixed → verified
You need to log in before you can comment on or make changes to this bug.