mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
Prevent browser tooltip from appearing
Bootstrap JS was clearing the `title` attribute, but then Mithril was redrawing and filling it back in.
This commit is contained in:
parent
8785baf1a1
commit
18f1960481
|
@ -63,14 +63,16 @@ export default class SubscriptionMenu extends Component {
|
|||
const notifyAlert = preferences['notify_newPost_alert'];
|
||||
|
||||
if ((notifyEmail || notifyAlert) && subscription === false) {
|
||||
buttonProps.title = app.translator.trans(notifyEmail
|
||||
? 'flarum-subscriptions.forum.sub_controls.notify_email_tooltip'
|
||||
: 'flarum-subscriptions.forum.sub_controls.notify_alert_tooltip');
|
||||
buttonProps.config = element => $(element).tooltip({
|
||||
container: '.SubscriptionMenu',
|
||||
placement: 'bottom',
|
||||
delay: 250
|
||||
});
|
||||
buttonProps.config = element => {
|
||||
$(element).tooltip({
|
||||
container: '.SubscriptionMenu',
|
||||
placement: 'bottom',
|
||||
delay: 250,
|
||||
title: app.translator.trans(notifyEmail
|
||||
? 'flarum-subscriptions.forum.sub_controls.notify_email_tooltip'
|
||||
: 'flarum-subscriptions.forum.sub_controls.notify_alert_tooltip')
|
||||
});
|
||||
}
|
||||
} else {
|
||||
buttonProps.config = element => $(element).tooltip('destroy');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user