terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Allow closing tabs with middle mouse button when close button is hidden

Open kasper93 opened this issue 2 years ago • 4 comments

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)

kasper93 avatar Sep 02 '23 19:09 kasper93

Updated with review changes.

kasper93 avatar Oct 07 '23 21:10 kasper93

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.

DHowett avatar Dec 15 '23 23:12 DHowett

Any news about this? Thanks.

kasper93 avatar Mar 18 '24 01:03 kasper93

Rebased to resolve merge conflict.

kasper93 avatar May 11 '24 11:05 kasper93