ui/gesture,ui/editor: don't focus and show keyboard on touch press

Wait until click for touches.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-05-12 18:06:18 +02:00
parent 530b9b09b2
commit 701ceda4d0
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -86,8 +86,9 @@ func (e *Editor) Update(c *ui.Config, pq pointer.Events, kq key.Events) {
}
scrollTo := false
for _, evt := range e.clicker.Update(pq) {
switch evt.Type {
case gesture.TypePress:
switch {
case evt.Type == gesture.TypePress && evt.Source == pointer.Mouse,
evt.Type == gesture.TypeClick && evt.Source == pointer.Touch:
scrollTo = true
e.blinkStart = c.Now
e.moveCoord(image.Point{