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

react-edit-text

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-edit-text - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [4.0.2](https://github.com/bymi15/react-edit-text/compare/v4.0.1...v4.0.2) (2021-04-03)
### Bug Fixes
* setSelectionRange causing bugs for input types that are not text ([777fba9](https://github.com/bymi15/react-edit-text/commit/777fba9f5d401d4374b653e6ae4f7f39b2c2adca))
## [4.0.1](https://github.com/bymi15/react-edit-text/compare/v4.0.0...v4.0.1) (2021-03-09)

@@ -2,0 +9,0 @@

14

dist/index.js

@@ -1166,2 +1166,8 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

_this.handleFocus = function (e) {
if (_this.props.type === 'text') {
e.currentTarget.setSelectionRange(e.currentTarget.value.length, e.currentTarget.value.length);
}
};
_this.state = {

@@ -1229,5 +1235,3 @@ previousValue: props.defaultValue || '',

autoFocus: true,
onFocus: function onFocus(e) {
return e.currentTarget.setSelectionRange(e.currentTarget.value.length, e.currentTarget.value.length);
}
onFocus: this.handleFocus
});

@@ -1248,5 +1252,3 @@ } else {

autoFocus: true,
onFocus: function onFocus(e) {
return e.currentTarget.setSelectionRange(e.currentTarget.value.length, e.currentTarget.value.length);
}
onFocus: this.handleFocus
});

@@ -1253,0 +1255,0 @@ }

@@ -1164,2 +1164,8 @@ import React from 'react';

_this.handleFocus = function (e) {
if (_this.props.type === 'text') {
e.currentTarget.setSelectionRange(e.currentTarget.value.length, e.currentTarget.value.length);
}
};
_this.state = {

@@ -1227,5 +1233,3 @@ previousValue: props.defaultValue || '',

autoFocus: true,
onFocus: function onFocus(e) {
return e.currentTarget.setSelectionRange(e.currentTarget.value.length, e.currentTarget.value.length);
}
onFocus: this.handleFocus
});

@@ -1246,5 +1250,3 @@ } else {

autoFocus: true,
onFocus: function onFocus(e) {
return e.currentTarget.setSelectionRange(e.currentTarget.value.length, e.currentTarget.value.length);
}
onFocus: this.handleFocus
});

@@ -1251,0 +1253,0 @@ }

{
"name": "react-edit-text",
"version": "4.0.1",
"version": "4.0.2",
"description": "Simple editable text component for React",

@@ -5,0 +5,0 @@ "author": "Brian Min <bymi15@yahoo.com> (https://github.com/bymi15)",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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