mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
refactor(ionSlideBox): fall back to element.parentNode or nothing for height
This commit is contained in:
4
js/angular/directive/slideBox.js
vendored
4
js/angular/directive/slideBox.js
vendored
@@ -98,8 +98,8 @@ function($ionicSlideBoxDelegate, $window) {
|
||||
// We just make it so the slidebox is *always* as large as its offsetParent.
|
||||
function repositionSlideBox() {
|
||||
element.css({
|
||||
width: element[0].offsetParent.offsetWidth + 'px',
|
||||
height: element[0].offsetParent.offsetHeight + 'px'
|
||||
width: (element[0].offsetParent || element[0].parentNode || {}).offsetWidth + 'px',
|
||||
height: (element[0].offsetParent || element[0].parentNode || {}).offsetHeight + 'px'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user