terminal
terminal copied to clipboard
Allow closing tabs with middle mouse button when close button is hidden
Summary of the Pull Request
This commit fixes the middle mouse button handler. The PointerReleased callback is registered, but it is not operational because, on the Release event, the mouse button is no longer pressed. We need to track its state and act accordingly.
Issue was introduced by commit 05e7ea1423ede8ee67c3462fb04538fae5c9f9b2, which changed the event handler from PointerPressed to PointerReleased, rendering it inoperative. Instead, the default handler is used. The main issue is that when the close button is hidden with the showCloseButton option, the default handler no longer closes the tab on middle mouse clicks.
Also made it consistent with the Settings tab, which was never converted to PointerReleased and is still handled with a custom handler.
References and Relevant Issues
Related commit 05e7ea1423ede8ee67c3462fb04538fae5c9f9b2
Validation Steps Performed
I've been using this commit locally for quite some time, figured out I might as well share it.
PR Checklist
- [ ] Closes #xxx
- [ ] Tests added/passed
- [ ] Documentation updated
- If checked, please file a pull request on our docs repo and link it here: #xxx
- [ ] Schema updated (if necessary)
Updated with review changes.
I'm sorry we left this one on read for so long! We're quieting down for the holidays, but I will make sure that we get a look at it as soon as is possible after that. Thank you for fixing this bug.
Any news about this? Thanks.
Rebased to resolve merge conflict.