luci-base: ui.js: fix function declaration in nested statement

Fix "SyntaxError: Strict mode does not allow function declarations
in a lexically nested statement" error that may occur in some old
browsers (detected on QtWebKit 5.212).

Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
This commit is contained in:
Anton Kikin 2020-05-24 02:12:20 +03:00
parent 62ed4e6e40
commit c00d0d9473

View file

@ -1176,7 +1176,7 @@ var UIDropdown = UIElement.extend(/** @lends LuCI.ui.Dropdown.prototype */ {
ul.style.maxHeight = (vpHeight * 0.5) + 'px';
ul.style.WebkitOverflowScrolling = 'touch';
function getScrollParent(element) {
var getScrollParent = function(element) {
var parent = element,
style = getComputedStyle(element),
excludeStaticParent = (style.position === 'absolute');