Fix tooltip not disappearing on some browsers#124
Conversation
imorland
left a comment
There was a problem hiding this comment.
Thanks for the contribution! The approach is correct — Bootstrap 3 tooltips respond to mouseleave events, so triggering one before the confirm() dialog opens is a valid fix. A couple of things to address before merging:
Required: TypeScript type on e
deleteAll(e: MouseEvent) {Without this, TypeScript will infer any for the parameter, which will fail in strict mode.
Minor: the onclick binding
The button's onclick needs to pass the event through:
onclick={this.deleteAll.bind(this)}This already works since Mithril passes the event as the first argument — just worth confirming it's wired correctly end to end since the method signature changed.
Out of scope but worth noting: the per-item delete/schedule tooltips in DraftsListItem likely have the same issue on affected browsers. Not a blocker for this PR.
|
Thanks for your review. I have committed changes accordingly:
Type annotation added.
Readability improvement added.
Added equal patches on mentioned tooltips. |
|
All CI/CD issues solved. |
Fixes #0000
As title, fixed the delete all drafts tooltip not disappearing on some specific browsers. I saw there was one previous fix on this but it could still be reproduced in specific situations. Likely slightly older chromic (not out of date), OperaGX, and some Safari.
Changes proposed in this pull request:
Reviewers should focus on:
If there's a better way to implement this, please tell me.
Screenshot
Confirmed
composer test).Required changes: