Socket
Socket
Sign inDemoInstall

react-redux-toastr

Package Overview
Dependencies
Maintainers
1
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-redux-toastr - npm Package Compare versions

Comparing version 4.4.1 to 4.4.2

22

lib/ToastrConfirm.js

@@ -66,2 +66,3 @@ 'use strict';

this.hasClicked = false;
this.confirmHolder.focus();

@@ -71,15 +72,4 @@ if (this.props.confirm.show) {

}
if (window) {
window.addEventListener('keyup', this.handleOnKeyUp);
window.addEventListener('keydown', this.handleOnKeyDown);
}
};
ToastrConfirm.prototype.componentWillUnmount = function componentWillUnmount() {
if (window) {
window.removeEventListener('keyup', this.handleOnKeyUp);
window.removeEventListener('keydown', this.handleOnKeyDown);
}
};
ToastrConfirm.prototype.handleOnKeyDown = function handleOnKeyDown(e) {

@@ -168,3 +158,11 @@ if ((0, _utils.keyCode)(e) == ENTER) {

'div',
{ className: 'confirm-holder' },
{
className: 'confirm-holder',
tabIndex: '-1',
ref: function ref(_ref2) {
return _this4.confirmHolder = _ref2;
},
onKeyDown: this.handleOnKeyDown,
onKeyUp: this.handleOnKeyUp
},
_react2.default.createElement(

@@ -171,0 +169,0 @@ 'div',

{
"name": "react-redux-toastr",
"version": "4.4.1",
"version": "4.4.2",
"description": "react-redux-toastr is a React toastr message implemented with Redux",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -37,2 +37,3 @@ import React, {Component, PropTypes} from 'react';

this.hasClicked = false;
this.confirmHolder.focus();

@@ -42,15 +43,4 @@ if (this.props.confirm.show) {

}
if (window) {
window.addEventListener('keyup', this.handleOnKeyUp);
window.addEventListener('keydown', this.handleOnKeyDown);
}
}
componentWillUnmount() {
if (window) {
window.removeEventListener('keyup', this.handleOnKeyUp);
window.removeEventListener('keydown', this.handleOnKeyDown);
}
}
handleOnKeyDown(e) {

@@ -130,3 +120,9 @@ if (keyCode(e) == ENTER) {

return (
<div className="confirm-holder">
<div
className="confirm-holder"
tabIndex="-1"
ref={ref => this.confirmHolder = ref}
onKeyDown={this.handleOnKeyDown}
onKeyUp={this.handleOnKeyUp}
>
<div className="confirm animated" ref={ref => this.confirm = ref}>

@@ -133,0 +129,0 @@ <div className="message">{this.props.confirm.message}</div>

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