commit | e24bc6f45caddd883af3be6ac5de0d8c53e9e4eb | [log] [tgz] |
---|---|---|
author | Jack Franklin <[email protected]> | Fri Oct 07 10:36:18 2022 |
committer | Devtools-frontend LUCI CQ <devtools-frontend-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Oct 07 11:56:58 2022 |
tree | fe99644a8c3cf78fb1674c87aa1b2f64b091f9af | |
parent | 895f8974ce94b6153c39369edb4f3b21c133252c [diff] [blame] |
Move isEscKey into KeyboardUtilities I know we're not proactively de-prototyping any more, but I had some spare time and fancied a quick change, so I've moved the global `isEscKey` onto `Platform.KeyboardUtilities`. Bug: 1050549 Change-Id: I42d63e2e304cfd44214a3e5cf24a6ecd103f1d50 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3938192 Auto-Submit: Jack Franklin <[email protected]> Commit-Queue: Jack Franklin <[email protected]> Reviewed-by: Simon Zünd <[email protected]> Commit-Queue: Simon Zünd <[email protected]>
diff --git a/front_end/panels/sources/WatchExpressionsSidebarPane.ts b/front_end/panels/sources/WatchExpressionsSidebarPane.ts index 1349fb8..9bf9f2d 100644 --- a/front_end/panels/sources/WatchExpressionsSidebarPane.ts +++ b/front_end/panels/sources/WatchExpressionsSidebarPane.ts
@@ -539,8 +539,9 @@ } private promptKeyDown(event: KeyboardEvent): void { - if (event.key === 'Enter' || isEscKey(event)) { - this.finishEditing(event, isEscKey(event)); + const isEscapeKey = Platform.KeyboardUtilities.isEscKey(event); + if (event.key === 'Enter' || isEscapeKey) { + this.finishEditing(event, isEscapeKey); } }