fix(browser_adapter): element.getBoundingClientRect fails when element not in DOM (IE11)
This commit is contained in:
parent
a393f84fa4
commit
f35dbb99b5
|
@ -270,7 +270,11 @@ defaultDoc() {
|
||||||
return document;
|
return document;
|
||||||
}
|
}
|
||||||
getBoundingClientRect(el) {
|
getBoundingClientRect(el) {
|
||||||
return el.getBoundingClientRect();
|
try {
|
||||||
|
return el.getBoundingClientRect();
|
||||||
|
} catch (e) {
|
||||||
|
return {top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
getTitle(): string {
|
getTitle(): string {
|
||||||
return document.title;
|
return document.title;
|
||||||
|
|
Loading…
Reference in New Issue