Skip to content

Commit c63a1d9

Browse files
fix(dialog)!: fix exception when opening when compiled with advanced closure settings
PiperOrigin-RevId: 511523151
1 parent 1f7e538 commit c63a1d9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dialog/lib/dialog.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,7 @@ export class Dialog extends LitElement {
332332
// prevent body scrolling early only when opening to avoid layout
333333
// shift when closing.
334334
if (!this.modeless && this.open) {
335-
(this.constructor as typeof Dialog)
336-
.setDocumentScrollingDisabled(this.open);
335+
Dialog.setDocumentScrollingDisabled(this.open);
337336
}
338337
if (this.open) {
339338
this.contentElement.scrollTop = 0;
@@ -410,8 +409,7 @@ export class Dialog extends LitElement {
410409
await closedPromise;
411410
// enable scrolling late to avoid layout shift when closing
412411
if (!this.modeless) {
413-
(this.constructor as typeof Dialog)
414-
.setDocumentScrollingDisabled(this.open);
412+
Dialog.setDocumentScrollingDisabled(this.open);
415413
}
416414
}
417415
// Focus initial element.

0 commit comments

Comments
 (0)