mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 09:25:38 +00:00
app/internal/wm: [js] avoid duplicated-paste
Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
This commit is contained in:
@@ -269,6 +269,14 @@ func (w *window) addEventListeners() {
|
|||||||
w.flushInput()
|
w.flushInput()
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
w.addEventListener(w.tarea, "paste", func(this js.Value, args []js.Value) interface{} {
|
||||||
|
if w.clipboard.IsUndefined() {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
// Prevents duplicated-paste, since "paste" is already handled through Clipboard API.
|
||||||
|
args[0].Call("preventDefault")
|
||||||
|
return nil
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *window) addHistory() {
|
func (w *window) addHistory() {
|
||||||
|
|||||||
Reference in New Issue
Block a user