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:
Toby Zerner 2015-11-03 17:41:31 +10:30
parent 8785baf1a1
commit 18f1960481

View File

@ -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');
}