RESOLVED FIXED 224034
[iPadOS] unable to reorder tabs on `*.mybinder.org`
https://bugs.webkit.org/show_bug.cgi?id=224034
Summary [iPadOS] unable to reorder tabs on `*.mybinder.org`
Devin Rousso
Reported 2021-03-31 18:55:27 PDT
.
Attachments
Patch (1.19 KB, patch)
2021-03-31 18:58 PDT, Devin Rousso
no flags
Patch (16.57 KB, patch)
2021-04-01 17:32 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2021-03-31 18:55:40 PDT
Devin Rousso
Comment 2 2021-03-31 18:58:57 PDT
Devin Rousso
Comment 3 2021-04-01 17:32:02 PDT
Created attachment 424967 [details] Patch the previous patch broke other areas of the site (e.g. nested menus in the menubar) so adjust `Quirks::shouldDispatchSimulatedMouseEvents` to take an `EventTarget` so that it can be conditionalized beyond the top document URL host
Brent Fulgham
Comment 4 2021-04-02 10:03:55 PDT
Comment on attachment 424967 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424967&action=review > Source/WebCore/dom/EventNames.h:409 > + if (is<Node>(target) && downcast<Node>(target).document().quirks().shouldDispatchSimulatedMouseEvents(&target)) { What if the target has been disconnected from the document? Do we need to check 'isConnected'? > Source/WebCore/page/Quirks.cpp:426 > + return ShouldDispatchSimulatedMouseEvents::DependingOnTargetFor_mybinder_org; Well, at least we have a way to address others like this now.
Brent Fulgham
Comment 5 2021-04-02 10:08:18 PDT
Comment on attachment 424967 [details] Patch r=me, but maybe check with Wenson whether we need to see if the Node is actually connected to the document for these touch things.
Wenson Hsieh
Comment 6 2021-04-02 12:10:50 PDT
Comment on attachment 424967 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424967&action=review >> Source/WebCore/dom/EventNames.h:409 >> + if (is<Node>(target) && downcast<Node>(target).document().quirks().shouldDispatchSimulatedMouseEvents(&target)) { > > What if the target has been disconnected from the document? Do we need to check 'isConnected'? I think it's fine to preserve existing behavior (and not check for whether the node is connected). I'm also not sure how that would work if the page adds an event listener to a disconnected node and then adds the node to the DOM..
Devin Rousso
Comment 7 2021-04-02 12:18:45 PDT
Comment on attachment 424967 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424967&action=review >>> Source/WebCore/dom/EventNames.h:409 >>> + if (is<Node>(target) && downcast<Node>(target).document().quirks().shouldDispatchSimulatedMouseEvents(&target)) { >> >> What if the target has been disconnected from the document? Do we need to check 'isConnected'? > > I think it's fine to preserve existing behavior (and not check for whether the node is connected). > > I'm also not sure how that would work if the page adds an event listener to a disconnected node and then adds the node to the DOM.. Yeah as @Wenson Hsieh said (he hit submit before I did) this patch doesn't change this behavior, it just moves where `document()` is called. Also, all `Node` should always have a `document()` even if they're not connected.
EWS
Comment 8 2021-04-02 12:32:11 PDT
Committed r275431: <https://commits.webkit.org/r275431> All reviewed patches have been landed. Closing bug and clearing flags on attachment 424967 [details].
Note You need to log in before you can comment on or make changes to this bug.