Commit f3ab7440 authored by Stephan Botta's avatar Stephan Botta
Browse files

Update 05-mobile-navbar.js

parent 9ae31436
Pipeline #19676 failed with stages
in 1 minute and 37 seconds
...@@ -16,5 +16,11 @@ ...@@ -16,5 +16,11 @@
var actualMaxHeight = parseInt(window.getComputedStyle(menu).maxHeight, 10) var actualMaxHeight = parseInt(window.getComputedStyle(menu).maxHeight, 10)
if (actualMaxHeight !== expectedMaxHeight) menu.style.maxHeight = expectedMaxHeight + 'px' if (actualMaxHeight !== expectedMaxHeight) menu.style.maxHeight = expectedMaxHeight + 'px'
} }
else {
menu.style.maxHeight = ''
var expectedMaxHeight = window.innerHeight - Math.round(menu.getBoundingClientRect().top)
var actualMaxHeight = parseInt(window.getComputedStyle(menu).maxHeight, 10)
if (actualMaxHeight !== expectedMaxHeight) menu.style.maxHeight = expectedMaxHeight + 'px'
}
} }
})() })()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment