mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix timing window when scrolling search box results
This commit is contained in:
parent
aad29e4487
commit
d9d65d59d1
@ -113,6 +113,7 @@ RED.search = (function() {
|
|||||||
}
|
}
|
||||||
function ensureSelectedIsVisible() {
|
function ensureSelectedIsVisible() {
|
||||||
var selectedEntry = searchResults.find("li.selected");
|
var selectedEntry = searchResults.find("li.selected");
|
||||||
|
if (selectedEntry.length === 1) {
|
||||||
var scrollWindow = searchResults.parent();
|
var scrollWindow = searchResults.parent();
|
||||||
var scrollHeight = scrollWindow.height();
|
var scrollHeight = scrollWindow.height();
|
||||||
var scrollOffset = scrollWindow.scrollTop();
|
var scrollOffset = scrollWindow.scrollTop();
|
||||||
@ -124,6 +125,7 @@ RED.search = (function() {
|
|||||||
scrollWindow.animate({scrollTop: '+='+(y-10)},50);
|
scrollWindow.animate({scrollTop: '+='+(y-10)},50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function createDialog() {
|
function createDialog() {
|
||||||
dialog = $("<div>",{id:"red-ui-search",class:"red-ui-search"}).appendTo("#main-container");
|
dialog = $("<div>",{id:"red-ui-search",class:"red-ui-search"}).appendTo("#main-container");
|
||||||
|
Loading…
Reference in New Issue
Block a user