fix(search): allow paste in search box (#338)

This commit is contained in:
Gabriele N. Tornetta
2021-03-27 15:05:16 -07:00
committed by GitHub
parent 03a5104317
commit d6f5efa06c
+4
View File
@@ -373,9 +373,13 @@ export class Application extends StatelessComponent<ApplicationProps> {
}
onDocumentPaste = (ev: Event) => {
if (document.activeElement != null && document.activeElement.nodeName === "INPUT")
return
ev.preventDefault()
ev.stopPropagation()
const clipboardData = (ev as ClipboardEvent).clipboardData
if (!clipboardData) return
const pasted = clipboardData.getData('text')