diff --git a/.eslintrc.js b/.eslintrc.js index 78275554..9e7ab34d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -56,6 +56,7 @@ module.exports = { onOptionsChanged: "writable", uiCurrentTab: "writable", uiElementIsVisible: "writable", + uiElementInSight: "writable", executeCallbacks: "writable", //ui.js opts: "writable", diff --git a/javascript/dragdrop.js b/javascript/dragdrop.js index 398a33f9..77a24a07 100644 --- a/javascript/dragdrop.js +++ b/javascript/dragdrop.js @@ -82,7 +82,7 @@ window.addEventListener('paste', e => { const visibleImageFields = [...gradioApp().querySelectorAll('[data-testid="image"]')] .filter(el => uiElementIsVisible(el)) - .sort((a,b) => uiElementInSight(b) - uiElementInSight(a)); + .sort((a, b) => uiElementInSight(b) - uiElementInSight(a)); if (!visibleImageFields.length) {