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
tippy
instead ofTippy
as 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
blur
listener,followCursor
setting andhideOnClick
setting.
Settings
duration
anddelay
can now be either a number or an array for [show, hide].hideDelay
andhideDuration
removed.- New
performance
setting added. Disablesdata-*
attribute settings for faster instantiation (around 2x faster). theme
can now have multiple themes, separate each theme by a space such astheme: 'main light'
Methods
getTooltippedElement
is nowgetReferenceElement
getReference
is nowgetReferenceData
. It also prefixes private properties with an underscore which are for internal/private use.- New
destroyAll
method added. Destroys all tooltips created by the instance.
Callbacks
beforeHidden
is nowhide
beforeShown
is 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
followCursor
on touch devices since it doesn’t apply to them. closest()
changed to a ponyfill instead of a polyfill.pointer-events: none
added on non-interactive tooltips to prevent cursor from changing and to stop
hide events from firing when usinganimation: shift
+arrow: true
when 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: 0
now makes callbacks synchronousoutline: 0
added to the popper element- Pointless/unused CSS removed