commit 0b860b22a88b95912aef685887b164fb580bb033
parent f1039ceef1f031cf1c8cfa068c60bbad33ce5054
Author: Jack Mordaunt <jackmordaunt@gmail.com>
Date: Thu, 5 Nov 2020 17:23:11 +0800
fix: temporary fix to avoid clickthrough by disabling ticket clicks while modal is open
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/cmd/kanban/layout.go b/cmd/kanban/layout.go
@@ -57,7 +57,6 @@ func (c Card) Layout(gtx C, th *material.Theme, w layout.Widget) D {
)
}),
)
-
}
// Modal renders content centered on a translucent scrim.
diff --git a/cmd/kanban/main.go b/cmd/kanban/main.go
@@ -155,6 +155,9 @@ func (ui *UI) Update(gtx C) {
}
for s, ok := ui.TicketStates.Next(); ok; s, ok = ui.TicketStates.Next() {
t := (*Ticket)(s)
+ if ui.Modal != nil {
+ continue
+ }
if t.NextButton.Clicked() {
if err := ui.Kanban.Progress(t.ID); err != nil {
fmt.Printf("error: %s\n", err)
@@ -186,7 +189,6 @@ func (ui *UI) Update(gtx C) {
}
}
if t.Content.Clicked() {
- // show detailed content.
ui.TicketDetails.Ticket = t.Ticket
ui.Modal = func(gtx C) D {
return Card{