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'];
|
const notifyAlert = preferences['notify_newPost_alert'];
|
||||||
|
|
||||||
if ((notifyEmail || notifyAlert) && subscription === false) {
|
if ((notifyEmail || notifyAlert) && subscription === false) {
|
||||||
buttonProps.title = app.translator.trans(notifyEmail
|
buttonProps.config = element => {
|
||||||
? 'flarum-subscriptions.forum.sub_controls.notify_email_tooltip'
|
$(element).tooltip({
|
||||||
: 'flarum-subscriptions.forum.sub_controls.notify_alert_tooltip');
|
container: '.SubscriptionMenu',
|
||||||
buttonProps.config = element => $(element).tooltip({
|
placement: 'bottom',
|
||||||
container: '.SubscriptionMenu',
|
delay: 250,
|
||||||
placement: 'bottom',
|
title: app.translator.trans(notifyEmail
|
||||||
delay: 250
|
? 'flarum-subscriptions.forum.sub_controls.notify_email_tooltip'
|
||||||
});
|
: 'flarum-subscriptions.forum.sub_controls.notify_alert_tooltip')
|
||||||
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
buttonProps.config = element => $(element).tooltip('destroy');
|
buttonProps.config = element => $(element).tooltip('destroy');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user