From 515bd927da7798bbac08e741dbe0b0f908af2a9b Mon Sep 17 00:00:00 2001 From: Anton Kikin Date: Sun, 24 May 2020 02:12:20 +0300 Subject: [PATCH] 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 (cherry picked from commit c00d0d9473803eec3248f0f6d7f3404923c80514) --- modules/luci-base/htdocs/luci-static/resources/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index bad415b30..8f8157634 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -1179,7 +1179,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'); -- 2.25.1