mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-06 08:00:05 +00:00
fix in searchbox
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user