Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-joyride

Package Overview
Dependencies
Maintainers
1
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-joyride - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

6

lib/scripts/Beacon.js
var React = require('react'),
hexToRGB = require('./utils.js').hexToRgb;
var isTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;
var Beacon = React.createClass({

@@ -73,4 +75,4 @@ displayName: 'JoyrideBeacon',

style: styles.beacon,
onClick: props.eventType === 'click' ? props.onTrigger : null,
onMouseEnter: props.eventType === 'hover' ? props.onTrigger : null
onClick: props.eventType === 'click' || isTouch ? props.onTrigger : null,
onMouseEnter: props.eventType === 'hover' && !isTouch ? props.onTrigger : null
},

@@ -77,0 +79,0 @@ React.createElement('span', {

@@ -18,3 +18,4 @@ var React = require('react'),

tooltips: {}
};
},
isTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;

@@ -268,8 +269,10 @@ var Component = React.createClass({

if (eventType === 'hover') {
if (eventType === 'hover' && !isTouch) {
listeners.tooltips[key] = { event: 'mouseenter', cb: this._onTooltipTrigger };
listeners.tooltips[key + 'mouseleave'] = { event: 'mouseleave', cb: this._onTooltipTrigger };
listeners.tooltips[key + 'click'] = { event: 'click', cb: function (e) {
e.preventDefault();
} };
listeners.tooltips[key + 'click'] = {
event: 'click', cb: function (e) {
e.preventDefault();
}
};

@@ -281,4 +284,4 @@ el.addEventListener('mouseenter', listeners.tooltips[key].cb);

else {
listeners.tooltips[key] = { event: eventType, cb: this._onTooltipTrigger };
el.addEventListener(eventType, listeners.tooltips[key].cb);
listeners.tooltips[key] = { event: 'click', cb: this._onTooltipTrigger };
el.addEventListener('click', listeners.tooltips[key].cb);
}

@@ -285,0 +288,0 @@ },

{
"name": "react-joyride",
"version": "1.1.0",
"version": "1.1.1",
"description": "Create walkthroughs and guided tours for your apps",

@@ -5,0 +5,0 @@ "author": "Gil Barbara <gilbarbara@gmail.com>",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc