Skip to content

Fix tooltip not disappearing on some browsers#124

Open
edgeinfinity1 wants to merge 4 commits into
FriendsOfFlarum:2.xfrom
edgeinfinity1:autoupl_fix
Open

Fix tooltip not disappearing on some browsers#124
edgeinfinity1 wants to merge 4 commits into
FriendsOfFlarum:2.xfrom
edgeinfinity1:autoupl_fix

Conversation

@edgeinfinity1

Copy link
Copy Markdown
Contributor

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

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).

Required changes:

@edgeinfinity1 edgeinfinity1 requested a review from a team as a code owner March 15, 2026 05:54

@imorland imorland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@edgeinfinity1

Copy link
Copy Markdown
Contributor Author

Thanks for your review. I have committed changes accordingly:

Required: TypeScript type on e

Type annotation added.

Minor: the onclick binding

Readability improvement added.

Out of scope but worth noting

Added equal patches on mentioned tooltips.

@edgeinfinity1

Copy link
Copy Markdown
Contributor Author

All CI/CD issues solved.

@edgeinfinity1 edgeinfinity1 requested a review from imorland April 9, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants