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

rc-input

Package Overview
Dependencies
Maintainers
3
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-input - npm Package Compare versions

Comparing version 1.4.3 to 1.4.4

54

es/utils/commonUtils.js

@@ -7,2 +7,26 @@ export function hasAddon(props) {

}
// TODO: It's better to use `Proxy` replace the `element.value`. But we still need support IE11.
function cloneEvent(event, target, value) {
// A bug report filed on WebKit's Bugzilla tracker, dating back to 2009, specifically addresses the issue of cloneNode() not copying files of <input type="file"> elements.
// As of the last update, this bug was still marked as "NEW," indicating that it might not have been resolved yet​​.
// https://bugs.webkit.org/show_bug.cgi?id=28123
var currentTarget = target.cloneNode(true);
// click clear icon
var newEvent = Object.create(event, {
target: {
value: currentTarget
},
currentTarget: {
value: currentTarget
}
});
// Fill data
currentTarget.value = value;
currentTarget.selectionStart = target.selectionStart;
currentTarget.selectionEnd = target.selectionEnd;
return newEvent;
}
export function resolveOnChange(target, e, onChange, targetValue) {

@@ -26,17 +50,3 @@ if (!onChange) {

// A bug report filed on WebKit's Bugzilla tracker, dating back to 2009, specifically addresses the issue of cloneNode() not copying files of <input type="file"> elements.
// As of the last update, this bug was still marked as "NEW," indicating that it might not have been resolved yet​​.
// https://bugs.webkit.org/show_bug.cgi?id=28123
var currentTarget = target.cloneNode(true);
// click clear icon
event = Object.create(e, {
target: {
value: currentTarget
},
currentTarget: {
value: currentTarget
}
});
currentTarget.value = '';
event = cloneEvent(e, target, '');
onChange(event);

@@ -50,15 +60,3 @@ return;

if (target.type !== 'file' && targetValue !== undefined) {
// A bug report filed on WebKit's Bugzilla tracker, dating back to 2009, specifically addresses the issue of cloneNode() not copying files of <input type="file"> elements.
// As of the last update, this bug was still marked as "NEW," indicating that it might not have been resolved yet​​.
// https://bugs.webkit.org/show_bug.cgi?id=28123
var _currentTarget = target.cloneNode(true);
event = Object.create(e, {
target: {
value: _currentTarget
},
currentTarget: {
value: _currentTarget
}
});
_currentTarget.value = targetValue;
event = cloneEvent(e, target, targetValue);
onChange(event);

@@ -65,0 +63,0 @@ return;

@@ -16,2 +16,26 @@ "use strict";

}
// TODO: It's better to use `Proxy` replace the `element.value`. But we still need support IE11.
function cloneEvent(event, target, value) {
// A bug report filed on WebKit's Bugzilla tracker, dating back to 2009, specifically addresses the issue of cloneNode() not copying files of <input type="file"> elements.
// As of the last update, this bug was still marked as "NEW," indicating that it might not have been resolved yet​​.
// https://bugs.webkit.org/show_bug.cgi?id=28123
var currentTarget = target.cloneNode(true);
// click clear icon
var newEvent = Object.create(event, {
target: {
value: currentTarget
},
currentTarget: {
value: currentTarget
}
});
// Fill data
currentTarget.value = value;
currentTarget.selectionStart = target.selectionStart;
currentTarget.selectionEnd = target.selectionEnd;
return newEvent;
}
function resolveOnChange(target, e, onChange, targetValue) {

@@ -35,17 +59,3 @@ if (!onChange) {

// A bug report filed on WebKit's Bugzilla tracker, dating back to 2009, specifically addresses the issue of cloneNode() not copying files of <input type="file"> elements.
// As of the last update, this bug was still marked as "NEW," indicating that it might not have been resolved yet​​.
// https://bugs.webkit.org/show_bug.cgi?id=28123
var currentTarget = target.cloneNode(true);
// click clear icon
event = Object.create(e, {
target: {
value: currentTarget
},
currentTarget: {
value: currentTarget
}
});
currentTarget.value = '';
event = cloneEvent(e, target, '');
onChange(event);

@@ -59,15 +69,3 @@ return;

if (target.type !== 'file' && targetValue !== undefined) {
// A bug report filed on WebKit's Bugzilla tracker, dating back to 2009, specifically addresses the issue of cloneNode() not copying files of <input type="file"> elements.
// As of the last update, this bug was still marked as "NEW," indicating that it might not have been resolved yet​​.
// https://bugs.webkit.org/show_bug.cgi?id=28123
var _currentTarget = target.cloneNode(true);
event = Object.create(e, {
target: {
value: _currentTarget
},
currentTarget: {
value: _currentTarget
}
});
_currentTarget.value = targetValue;
event = cloneEvent(e, target, targetValue);
onChange(event);

@@ -74,0 +72,0 @@ return;

{
"name": "rc-input",
"version": "1.4.3",
"version": "1.4.4",
"description": "React input component",

@@ -5,0 +5,0 @@ "keywords": [

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