Skip to content

Commit

Permalink
Prevent browser tooltip from appearing
Browse files Browse the repository at this point in the history
Bootstrap JS was clearing the `title` attribute, but then Mithril was redrawing and filling it back in.
  • Loading branch information
tobyzerner committed Nov 3, 2015
1 parent 4860480 commit de95219
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions js/forum/src/components/SubscriptionMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down

0 comments on commit de95219

Please sign in to comment.