Open Bug 1778923 Opened 2 years ago Updated 1 month ago

Firefox sends mouseout events with a null relatedTarget when a select control opens

Categories

(Core :: DOM: Events, defect, P3)

defect

Tracking

()

Webcompat Priority P2

People

(Reporter: jrmuizel, Assigned: smaug, NeedInfo)

References

(Blocks 2 open bugs, )

Details

(Keywords: webcompat:platform-bug)

Attachments

(1 file, 1 obsolete file)

From https://github.com/webcompat/web-bugs/issues/107135

Trying to select the quantity when doing a return doesn't work. The select box disappears as soon as you click it.

The original source code does something like:

                    if ((isMouseLeave || isClick) && $(".js-header .ar-header__search-input").val() != app.search.getSearchParams().q) {
                        if (!$("input:focus").length) {
                            $(".js-header .ar-header__search-input").val("").focus().blur()
                        }
                    }

This test case clearly shows the difference. Firefox sends mouseout events with a null relatedTarget when the select control opens. Chrome and Safari do not.

Smaug, do you have any ideas about this? (Edgar is in PTO now so that I ask you.)

Flags: needinfo?(bugs)

This is tricky one since the behavior Gecko has is more reasonable.

Can you explain why?

Is there any chance we could spec our behaviour or get the other browsers to switch?

Flags: needinfo?(jmuizelaar)
Flags: needinfo?(jmuizelaar)
Severity: -- → S3
Priority: -- → P3

Why is this only considered an S3?

Flags: needinfo?(htsai)

(In reply to Jeff Muizelaar [:jrmuizel] from comment #6)

Why is this only considered an S3?

I thought about several things: how broken was the page ? According to my understanding from the webcompat report and QA testing, I didn't consider it "severely impaired" because for example, adding an item into cart still worked as expected. I didn't seem to find other duplicates of this mouseout behavior that was another factor that I didn't consider it "severely impaired". I also looked at the website ranking and compared the ranking of the sites with other triaged webcompat bugs . I could have mixed up ranking comparison or undervalued the impact. Please feel free to suggest the right severity. I also marked Webcompat Priority? to bring to the webcompat team's radar and see if there's something we can do with system addons (assuming it may take long to address the platform change per comment 4?).

Webcompat Priority: --- → ?
Flags: needinfo?(htsai)

Setting Webcompat Priority as P2 since this is an important site, but not all users of the site are affected. Adding a ni for Tom to investigate a possible sitepatch

Webcompat Priority: ? → P2
Flags: needinfo?(twisniewski)

edgar, you've looked into cross-process mouse enter/leave (in widget sense) code. Do you think we could do something for this case?

Flags: needinfo?(smaug) → needinfo?(echen)
Attachment #9284857 - Attachment is obsolete: true
Blocks: 1886523
Summary: Can't return items on aritzia.com in Firefox → Firefox sends mouseout events with a null relatedTarget when a select control opens
Blocks: 1886525

Unfortunately I can't really study this on their live site, but running this code early on the page fixes the testcase (both with jQuery and without, by preventing the extra mouseout events from being seen by the page):

document.documentElement.addEventListener("mouseout", e => {
  if (!e.relatedTarget && e.target.nodeName === "SELECT") {
    e.stopPropagation();
  }
}, {capture:true});

If we think this site is still affected, we can try this. Dennis, you have the 126 intervention cycle.. what do you think?

Flags: needinfo?(twisniewski) → needinfo?(dschubert)
See Also: → 1890272

Sure, we can at least try. Filed bug 1890272 for that.

Flags: needinfo?(dschubert)

Verified this issue and still reproduces on Firefox Nightly based on test case. The drop-down fails to stay open.

Tested with:

Browser / Version: Firefox Nightly 128.0a1 (2024-05-29) (64-bit)
Operating System: Windows 10 PRO x64

Assignee: nobody → smaug
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: