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:
parent
62ed4e6e40
commit
c00d0d9473
1 changed files with 1 additions and 1 deletions
|
@ -1176,7 +1176,7 @@ var UIDropdown = UIElement.extend(/** @lends LuCI.ui.Dropdown.prototype */ {
|
||||||
ul.style.maxHeight = (vpHeight * 0.5) + 'px';
|
ul.style.maxHeight = (vpHeight * 0.5) + 'px';
|
||||||
ul.style.WebkitOverflowScrolling = 'touch';
|
ul.style.WebkitOverflowScrolling = 'touch';
|
||||||
|
|
||||||
function getScrollParent(element) {
|
var getScrollParent = function(element) {
|
||||||
var parent = element,
|
var parent = element,
|
||||||
style = getComputedStyle(element),
|
style = getComputedStyle(element),
|
||||||
excludeStaticParent = (style.position === 'absolute');
|
excludeStaticParent = (style.position === 'absolute');
|
||||||
|
|
Loading…
Reference in a new issue