Skip to content

Commit

Permalink
Revert "Implement new dialog shadow focus behavior"
Browse files Browse the repository at this point in the history
This reverts commit afeccd1f5b2dd72595abe55bc9ef093f11b495f1.

Reason for revert: dialog-focus-shadow.html is failing on a couple of mac builders:

https://ci.chromium.org/ui/p/chromium/builders/ci/Mac10.13%20Tests/57992/overview
https://ci.chromium.org/ui/p/chromium/builders/ci/Mac10.14%20Tests/28597/overview

Original change's description:
> Implement new dialog shadow focus behavior
>
> This implements the new dialog initial focus behavior specified in these
> changes:
> whatwg/html#7079
> whatwg/html#7284
> whatwg/html#7361
> whatwg/html#8174
>
> The gist of the changes are:
> 1. Use the DOM tree instead of the flat tree to search for an element to
>    give initial focus.
> 2. Don't traverse into shadow roots when looking for elements to give
>    initial focus unless the shadow root has delegatesFocus.
>
> This will stay experimental until I have also made the other changes for
> dialog initial focus: whatwg/html#8199
> After those changes have been made as well, I will carefully enable the
> flag by default.
>
> Fixed: 383230, 670130, 1292852
> Change-Id: I13995197f1942aa356cab0f3b41a0e226d1d170d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3961528
> Reviewed-by: Mason Freed <masonf@chromium.org>
> Commit-Queue: Joey Arhar <jarhar@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1067796}

Change-Id: I010be9a77fd8c289edb8c028355182d0fe7dec39
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4005547
Commit-Queue: Tim Sergeant <tsergeant@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Tim Sergeant <tsergeant@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Tim Sergeant <tsergeant@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1067950}
  • Loading branch information
tgsergeant authored and chromium-wpt-export-bot committed Nov 7, 2022
1 parent 4593826 commit fe3a338
Showing 1 changed file with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,24 +214,6 @@
</template>
</dialog>

<dialog data-description="No autofocus, no delegatesFocus, slotted target">
<template class="turn-into-shadow-tree">
<button tabindex="-1">Focusable</button>
<slot></slot>
<button tabindex="-1">Focusable</button>
</template>
<button tabindex="-1" class="focus-me">Focusable</button>
</dialog>

<dialog data-description="Shadowroot on child, no autofocus, no delegatesFocus">
<div>
<template class="turn-into-shadow-tree">
<button tabindex="-1">Focusable</button>
</template>
</div>
<button tabindex="-1" class="focus-me">Focusable</button>
</dialog>

<script>
for (const template of document.querySelectorAll(".turn-into-shadow-tree")) {
const div = document.createElement("div");
Expand Down

0 comments on commit fe3a338

Please sign in to comment.