Breaking changes, features and fixes in v1.0.0
Lots of tests have been written (more to be written over time) and code refactored into individual units. API has been simplified.
Core
- Popper.js 1.9.9 => 1.10.2
- The module is now lowercase
tippyinstead ofTippyas it’s just a factory function not a constructor. - Access the browser settings set internally by accessing
tippy.Browser. tippy.defaultSettings=>tippy.Defaults- New dynamic input detection enabled for more reliable settings. Notable settings where this is important is
blurlistener,followCursorsetting andhideOnClicksetting.
Settings
durationanddelaycan now be either a number or an array for [show, hide].hideDelayandhideDurationremoved.- New
performancesetting added. Disablesdata-*attribute settings for faster instantiation (around 2x faster). themecan now have multiple themes, separate each theme by a space such astheme: 'main light'
Methods
getTooltippedElementis nowgetReferenceElementgetReferenceis nowgetReferenceData. It also prefixes private properties with an underscore which are for internal/private use.- New
destroyAllmethod added. Destroys all tooltips created by the instance.
Callbacks
beforeHiddenis nowhidebeforeShownis nowshow- The five are:
show,shown,hide,hidden,wait.
Fixes
- Interactive tooltips will now close if the cursor leaves the document and there was no gap between the element, popper and browser window
- Interactive tooltips with delay won't show on first hover if mouseleave was fired before delay finished (#62)
- Enable event listeners for
followCursoron touch devices since it doesn’t apply to them. closest()changed to a ponyfill instead of a polyfill.pointer-events: noneadded on non-interactive tooltips to prevent cursor from changing and to stop
hide events from firing when usinganimation: shift+arrow: truewhen the cursor lands on the arrow.- Slightly improved animations
- Simplified simulated click on iOS. External anchor links (i.e. with
target="_blank") will require a double-tap, but internal links will load on first tap. duration: 0now makes callbacks synchronousoutline: 0added to the popper element- Pointless/unused CSS removed