fix in searchbox

This commit is contained in:
tamat
2019-11-05 11:36:52 +01:00
parent 44e3723c47
commit 64a0109d87
3 changed files with 168 additions and 137 deletions

View File

@@ -9169,7 +9169,21 @@ LGraphNode.prototype.executeAction = function(action)
var graphcanvas = LGraphCanvas.active_canvas;
var canvas = graphcanvas.canvas;
var root_document = canvas.ownerDocument || document;
if( root_document.fullscreenElement )
root_document.fullscreenElement.appendChild(dialog);
else
root_document.body.appendChild(dialog);
//compute best position
var rect = canvas.getBoundingClientRect();
var left = ( event ? event.clientX : (rect.left + rect.width * 0.5) ) - 80;
var top = ( event ? event.clientY : (rect.top + rect.height * 0.5) ) - 20;
dialog.style.left = left + "px";
dialog.style.top = top + "px";
/*
var offsetx = -20;
var offsety = -20;
if (rect) {
@@ -9184,8 +9198,9 @@ LGraphNode.prototype.executeAction = function(action)
dialog.style.left = canvas.width * 0.5 + offsetx + "px";
dialog.style.top = canvas.height * 0.5 + offsety + "px";
}
canvas.parentNode.appendChild(dialog);
*/
input.focus();
function select(name) {