Comparing version 1.0.2 to 1.0.3
@@ -1,7 +0,5 @@ | ||
var unsupportedTypes = ['number', 'email', 'time', 'color', 'month', 'range', 'date']; | ||
var naturalSelection = require('natural-selection'); | ||
module.exports = function(element, value){ | ||
var canSet = element.setSelectionRange && | ||
!~unsupportedTypes.indexOf(element.type) && | ||
element === document.activeElement; | ||
var canSet = naturalSelection(element) && element === document.activeElement; | ||
@@ -17,2 +15,2 @@ if (canSet) { | ||
} | ||
}; | ||
}; |
{ | ||
"name": "setify", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Set an input value without losing cursor position", | ||
@@ -13,3 +13,3 @@ "main": "index.js", | ||
"type": "git", | ||
"url": "https://github.com/matthewLarner/setify.git" | ||
"url": "https://github.com/MatthewLarner/setify.git" | ||
}, | ||
@@ -23,5 +23,8 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/matthewLarner/setify/issues" | ||
"url": "https://github.com/MatthewLarner/setify/issues" | ||
}, | ||
"homepage": "https://github.com/matthewLarner/setify" | ||
"homepage": "https://github.com/MatthewLarner/setify", | ||
"dependencies": { | ||
"natural-selection": "^1.0.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2822
1
12
+ Addednatural-selection@^1.0.0
+ Addednatural-selection@1.0.1(transitive)