mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-05 03:32:37 +00:00
split visibility method and sort instead
split out the visibility method for pasting and use a sort inside the paste handler to prioritize on-screen fields rather than targeting ONLY on screen fields
This commit is contained in:
5
javascript/dragdrop.js
vendored
5
javascript/dragdrop.js
vendored
@@ -81,7 +81,10 @@ window.addEventListener('paste', e => {
|
||||
}
|
||||
|
||||
const visibleImageFields = [...gradioApp().querySelectorAll('[data-testid="image"]')]
|
||||
.filter(el => uiElementIsVisible(el));
|
||||
.filter(el => uiElementIsVisible(el))
|
||||
.sort((a,b) => uiElementInSight(b) - uiElementInSight(a));
|
||||
|
||||
|
||||
if (!visibleImageFields.length) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user