mirror of
https://github.com/material-components/material-web.git
synced 2024-10-05 17:48:16 +03:00
fix(menu): getBoundingClientRect()
and getClientRects()
not working
PiperOrigin-RevId: 634601756
This commit is contained in:
parent
930883d819
commit
e1f9cbc59e
@ -461,6 +461,20 @@ export abstract class Menu extends LitElement {
|
||||
this.cleanUpGlobalEventListeners();
|
||||
}
|
||||
|
||||
override getBoundingClientRect() {
|
||||
if (!this.surfaceEl) {
|
||||
return super.getBoundingClientRect();
|
||||
}
|
||||
return this.surfaceEl.getBoundingClientRect();
|
||||
}
|
||||
|
||||
override getClientRects() {
|
||||
if (!this.surfaceEl) {
|
||||
return super.getClientRects();
|
||||
}
|
||||
return this.surfaceEl.getClientRects();
|
||||
}
|
||||
|
||||
protected override render() {
|
||||
return this.renderSurface();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user