fix: clear currentText on closing
This commit is contained in:
+3
-1
@@ -51,7 +51,7 @@ local function render()
|
|||||||
placeholder = noctalia.tr("panel.placeholder"),
|
placeholder = noctalia.tr("panel.placeholder"),
|
||||||
onChange = "onTextChange",
|
onChange = "onTextChange",
|
||||||
onSubmit = "onTextSubmit",
|
onSubmit = "onTextSubmit",
|
||||||
value = keepOnClose and currentText or ""
|
value = currentText
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,6 +242,8 @@ function onClose()
|
|||||||
if not keepOnClose and imagePath ~= nil then
|
if not keepOnClose and imagePath ~= nil then
|
||||||
noctalia.removeFile(imagePath)
|
noctalia.removeFile(imagePath)
|
||||||
imagePath = nil
|
imagePath = nil
|
||||||
|
errorMessage = nil
|
||||||
|
currentText = ""
|
||||||
render()
|
render()
|
||||||
-- calling render() here so it doesn't try to render the image when opening the panel
|
-- calling render() here so it doesn't try to render the image when opening the panel
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user