Skip to content

Commit e2022a7

Browse files
Nancy LiDevtools-frontend LUCI CQ
authored andcommitted
Fix a bug in Dialog positioning
The position is wrong when `dialog.showConnector` is false. The height is only 1 * connector height, but we minus 2 * connector height when calculate the top. Bug:383278166 Change-Id: I6f1baf2488dac2f4c16f3bd10ac5e61c9d6565fc Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6085915 Auto-Submit: Nancy Li <[email protected]> Commit-Queue: Nancy Li <[email protected]> Commit-Queue: Andres Olivares <[email protected]> Reviewed-by: Andres Olivares <[email protected]>
1 parent 61007ff commit e2022a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

front_end/ui/components/dialogs/Dialog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ export class Dialog extends HTMLElement {
555555
this.style.setProperty('--dialog-top', '0');
556556
this.style.setProperty('--dialog-margin', 'auto');
557557
this.style.setProperty('--dialog-margin-bottom', `${innerHeight - anchorTop}px`);
558-
this.#hitArea.y = anchorTop - 2 * CONNECTOR_HEIGHT;
558+
this.#hitArea.y = anchorTop - (CONNECTOR_HEIGHT * (this.showConnector ? 2 : 1));
559559
this.style.setProperty('--dialog-offset-y', `${DIALOG_ANIMATION_OFFSET}px`);
560560
this.style.setProperty(
561561
'--dialog-max-height',

0 commit comments

Comments
 (0)