github atomiks/tippyjs v1.0.0

latest releases: v6.3.7, v6.3.5, v6.3.4...
6 years ago

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 of Tippy 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 and hideOnClick setting.

Settings

  • duration and delay can now be either a number or an array for [show, hide].
  • hideDelay and hideDuration removed.
  • New performance setting added. Disables data-* attribute settings for faster instantiation (around 2x faster).
  • theme can now have multiple themes, separate each theme by a space such as theme: 'main light'

Methods

  • getTooltippedElement is now getReferenceElement
  • getReference is now getReferenceData. 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 now hide
  • beforeShown is now show
  • 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 using animation: 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 synchronous
  • outline: 0 added to the popper element
  • Pointless/unused CSS removed

Don't miss a new tippyjs release

NewReleases is sending notifications on new releases.