Open Bug 1771096 Opened 3 years ago Updated 2 months ago

The drop-down list cannot be opened

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

Firefox 100
x86_64
Windows 10
defect

Tracking

()

Webcompat Priority P2
Webcompat Score 5

People

(Reporter: jsfsbrv, Unassigned)

References

(Depends on 1 open bug, )

Details

(Keywords: webcompat:platform-bug, webcompat:site-report, Whiteboard: [domcore-bugbash-triaged])

User Story

platform:windows,mac,linux,android
impact:workflow-broken
configuration:general
affects:all
branch:release
user-impact-score:160
diagnosis-team:dom

Attachments

(4 files)

Attached image err.jpg

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0

Steps to reproduce:

  1. On this page: https://sanjeobsoci.com/breakfast/?lang=en I want to book breakfast.
  2. I want to enter a reservation date.
  3. I select the drop-down list to select months

Actual results:

I want to change the reservation month. A drop-down list of months will open, but will close immediately. I can't pick a month.

Expected results:

The drop-down list must remain open until the user selects a month.

I can reproduce this as far back as 91, it seems to not be a recent regression.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64
Component: Untriaged → Layout: Form Controls
Product: Firefox → Core
Attached video testing_bug.webm

This page is doing some funky stuff with focus that I don't fully understand. Basically, the moment I click the month picker, focus is immediately stolen and document.activeElement becomes <body>. I can make the month picker appear by deactivating the focus handler with devtools.

This page seems to depend on the fact that stealing focus from user-initiated <select> is not possible in Chromium (I think?).

Attached file reduced.html
Component: Layout: Form Controls → DOM: UI Events & Focus Handling

I did some investigate, after clicking the month select element, the page tried to focus the modal div element, and the focus moves to that element in Firefox, but in Chrome the modal div element isn't not focus-able. I think it is why we don't see this on Chrome.

<div id="myModal" class="modal fade in" role="dialog" style="display: block; padding-left: 0px;">...

(This is also related to bug 1334155 where we start hiding the drop-down list after the select element is blurred)

(In reply to Edgar Chen [:edgar] from comment #5)

I did some investigate, after clicking the month select element, the page tried to focus the modal div element, and the focus moves to that element in Firefox, but in Chrome the modal div element isn't not focus-able. I think it is why we don't see this on Chrome.

<div id="myModal" class="modal fade in" role="dialog" style="display: block; padding-left: 0px;">...

Hi Dennis, do you think we can reach out to the website to ask them to not rely on Chrome-specific behavior? Thanks.

Flags: needinfo?(dschubert)

I've sent them an email!

Flags: needinfo?(dschubert)
Whiteboard: [domcore-bugbash-triaged]
User Story: (updated)
Webcompat Priority: --- → P2
Webcompat Score: --- → 6

This is still broken, but the issue mentioned in comment 6 is marked as fixed. We should probably do another round of diagnosis here.

User Story: (updated)
Webcompat Score: 6 → 5

(I will take a look again)

(In reply to Edgar Chen [:edgar] from comment #5)

I did some investigate, after clicking the month select element, the page tried to focus the modal div element, and the focus moves to that element in Firefox, but in Chrome the modal div element isn't not focus-able. I think it is why we don't see this on Chrome.

<div id="myModal" class="modal fade in" role="dialog" style="display: block; padding-left: 0px;">...

This comment is no longer valid, on Chrome, the focus also moves to <div id="myModal" ...> when clicking the month select element.

As I mentioned in comment #6, the dropdown list closes because the <select> element loses focus. In contrast, both Chrome and Safari keep the dropdown open unless the focus moves to the browser UI. It seems like a long-existing behavior, and I didn't found any existing bug for this behavior, so I filed bug 1976341.

As chatted in the webcompat channel, I am removing the keyword webcompat:site-wait for this case. Other keywords reflect the recent situation more correctly.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: