Changeset 249493 in webkit


Ignore:
Timestamp:
Sep 4, 2019 12:38:37 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

[iPadOS] Unable to change sheets on Airtable.com
https://bugs.webkit.org/show_bug.cgi?id=201456
<rdar://problem/51557377>

Patch by Antoine Quint <Antoine Quint> on 2019-09-04
Reviewed by Dean Jackson.

Simulated mouse events are required to be able to manipulate cells and and columns on Airtable.com. However, dispatching a "mousedown" event on
tabs allowing to pick a different sheet ends up calling preventDefault() and prevent "click" events from being dispatched, which makes it
impossible to change sheet. We now limit the dispatch of simulated mouse events to the grid.

  • page/Quirks.cpp:

(WebCore::Quirks::simulatedMouseEventTypeForTarget const):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r249481 r249493  
     12019-09-04  Antoine Quint  <graouts@apple.com>
     2
     3        [iPadOS] Unable to change sheets on Airtable.com
     4        https://bugs.webkit.org/show_bug.cgi?id=201456
     5        <rdar://problem/51557377>
     6
     7        Reviewed by Dean Jackson.
     8
     9        Simulated mouse events are required to be able to manipulate cells and and columns on Airtable.com. However, dispatching a "mousedown" event on
     10        tabs allowing to pick a different sheet ends up calling preventDefault() and prevent "click" events from being dispatched, which makes it
     11        impossible to change sheet. We now limit the dispatch of simulated mouse events to the grid.
     12
     13        * page/Quirks.cpp:
     14        (WebCore::Quirks::simulatedMouseEventTypeForTarget const):
     15
    1162019-09-04  Youenn Fablet  <youenn@apple.com>
    217
  • trunk/Source/WebCore/page/Quirks.cpp

    r248944 r249493  
    377377        return Event::IsCancelable::No;
    378378
     379    if (equalLettersIgnoringASCIICase(host, "airtable.com") || host.endsWithIgnoringASCIICase(".airtable.com")) {
     380        // We want to limit simulated mouse events to elements under <div id="paneContainer"> to allow for column re-ordering and multiple cell selection.
     381        if (is<Node>(target)) {
     382            auto* node = downcast<Node>(target);
     383            if (auto* paneContainer = node->treeScope().getElementById(AtomString("paneContainer"))) {
     384                if (paneContainer->contains(node))
     385                    return Event::IsCancelable::Yes;
     386            }
     387        }
     388        return { };
     389    }
     390
    379391    return Event::IsCancelable::Yes;
    380392}
Note: See TracChangeset for help on using the changeset viewer.