mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-12-23 23:49:11 +01:00
Don't paste empty prompts
When pasting e.g. an image, window.clipboardData).getData('text') returns an empty string, which would delete the prompt. https://discord.com/channels/1014774730907209781/1093186485563424838
This commit is contained in:
parent
7d4d85284b
commit
9e244f758c
@ -608,7 +608,7 @@ document.addEventListener('paste', async (event) => {
|
||||
}
|
||||
const paste = (event.clipboardData || window.clipboardData).getData('text')
|
||||
const selection = window.getSelection()
|
||||
if (selection.toString().trim().length <= 0 && await parseContent(paste)) {
|
||||
if (paste != "" && selection.toString().trim().length <= 0 && await parseContent(paste)) {
|
||||
event.preventDefault()
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user