From 63c5ce087dafbdbd5bb48ce69e62028982d08932 Mon Sep 17 00:00:00 2001 From: Benedikt Meurer Date: Fri, 17 Jan 2025 14:25:42 +0100 Subject: [PATCH] [cleanup] Remove incorrectly overridden `focus()` method. The `Button` component didn't override `focus()` correctly, as it wasn't accepting (and passing through) the `FocusOptions`. It's also unnecessary to even override the `focus()` method, since we pass `delegatesFocus: true` when creating the shadow root. Bug: 301364727 Change-Id: I946204ae086ee6344b099f332da065eb401abafe Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6179965 Reviewed-by: Alex Rudenko Commit-Queue: Benedikt Meurer Auto-Submit: Benedikt Meurer --- .../ui/components/buttons/Button.test.ts | 20 +++++++++++++++++++ front_end/ui/components/buttons/Button.ts | 4 ---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/front_end/ui/components/buttons/Button.test.ts b/front_end/ui/components/buttons/Button.test.ts index 525668bc284..39eadd652b2 100644 --- a/front_end/ui/components/buttons/Button.test.ts +++ b/front_end/ui/components/buttons/Button.test.ts @@ -54,6 +54,26 @@ describe('Button', () => { assert.isTrue(button.disabled); }); + describe('focus', () => { + it('correctly focuses the