1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 21:05:53 +00:00
* Fixed: Maintain the mouse hover state for chat when moving the mouse over the context menu from an in-line chat action.
* Fixed: Do not allow mouse interaction with the notice at the bottom of chat when chat if frozen, ensuring that users can interact with the bottom chat line.
* Fixed: Block and Hide Thumbnails buttons not appearing on Directory pages.
* API Fixed: `deep_copy()` converting `null` into `{}`.
* API Changed: Tooltips can now emit hover events.
This commit is contained in:
SirStendec 2019-06-12 21:13:53 -04:00
parent 21ee6fcfb7
commit 734a73eb0e
9 changed files with 119 additions and 26 deletions

View file

@ -45,6 +45,7 @@ export default class TooltipProvider extends Module {
delayShow: this.checkDelayShow.bind(this),
content: this.process.bind(this),
interactive: this.checkInteractive.bind(this),
hover_events: this.checkHoverEvents.bind(this),
popper: {
placement: 'top',
modifiers: {
@ -55,6 +56,14 @@ export default class TooltipProvider extends Module {
boundariesElement: container
}
}
},
onHover: (target, tip, event) => {
this.emit(':hover', target, tip, event)
},
onLeave: (target, tip, event) => {
this.emit(':leave', target, tip, event);
}
});
@ -95,6 +104,16 @@ export default class TooltipProvider extends Module {
return false;
}
checkHoverEvents(target, tip) {
const type = target.dataset.tooltipType,
handler = this.types[type];
if ( has(handler, 'hover_events') )
return maybe_call(handler.hover_events, null, target, tip);
return false;
}
process(target, tip) {
const type = target.dataset.tooltipType || 'text',
handler = this.types[type];
@ -103,7 +122,7 @@ export default class TooltipProvider extends Module {
return [
createElement('strong', null, 'Unhandled Tooltip Type'),
createElement('code', {
className: 'block pd-t-05 border-t mg-t-05',
className: 'tw-block pd-t-05 border-t mg-t-05',
style: {
fontFamily: 'monospace',
textAlign: 'left'