mirror of https://github.com/rivo/tview.git
Not promoting a mouse-up event to a click event when it was prevented by a mouse capture. See #752
This commit is contained in:
parent
37ad0bb937
commit
20b8a06707
|
@ -460,8 +460,8 @@ func (a *Application) fireMouseActions(event *tcell.EventMouse) (consumed, isMou
|
||||||
if buttons&buttonEvent.button != 0 {
|
if buttons&buttonEvent.button != 0 {
|
||||||
fire(buttonEvent.down)
|
fire(buttonEvent.down)
|
||||||
} else {
|
} else {
|
||||||
fire(buttonEvent.up)
|
fire(buttonEvent.up) // A user override might set event to nil.
|
||||||
if !clickMoved {
|
if !clickMoved && event != nil {
|
||||||
if a.lastMouseClick.Add(DoubleClickInterval).Before(time.Now()) {
|
if a.lastMouseClick.Add(DoubleClickInterval).Before(time.Now()) {
|
||||||
fire(buttonEvent.click)
|
fire(buttonEvent.click)
|
||||||
a.lastMouseClick = time.Now()
|
a.lastMouseClick = time.Now()
|
||||||
|
|
Loading…
Reference in New Issue