[BUG] Button gets pressed on mouse hover with crossterm
- Dominant language
- Rust
- Stars
- 4.8k
- Forks
- 270
- Avg merge
- 5d 19h
- Merged PRs (30d)
- 2
Description
**Describe the bug**
Hovering over a button presses it when using the crossterm backend. Termion has the correct behavior.
**To Reproduce**
1. `cursive = { version = "0.20.0", default-features = false, features = ["crossterm-backend"] }`
2. Use the example code:
```
use cursive::views::{Dialog, TextView};
fn main() {
// Creates the cursive root - required for every application.
let mut siv = cursive::default();
// Creates a dialog with a single "Quit" button
siv.add_layer(Dialog::around(TextView::new("Hello Dialog!"))
.title("Cursive")
.button("Quit", |s| s.quit()));
// Starts the event loop.
siv.run();
}
```
3. Touch the quit button with the mouse cursor.
**Expected behavior**
Nothing happens unless I left-click.
**Environment**
* macOS Sonoma 14.0, M1 pro
* Backend: crossterm
* Current locale:
```
LANG=""
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
```
* Cursive version: 0.20
Contributor guide
Assessment
This issue has not been assessed yet.