Skip to content

Commit

Permalink
Merge pull request #1 from imtiazahmeddahar/master
Browse files Browse the repository at this point in the history
other number button support is added from 0 to 9 - QWERTY Keyboard nu…
  • Loading branch information
HichemTab-tech authored Aug 9, 2023
2 parents 8b16266 + 4e351a5 commit d4bc444
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dist/otpdesigner.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* OTP-designer-jquery v1.0.0
* OTP-designer-jquery v1.0.2
* (c) HichemTech
* Released under the MIT License.
* Github: github.com/HichemTab-tech/OTP-designer-jquery
Expand Down Expand Up @@ -643,7 +643,7 @@ const otpdesigner = function (options = {}, ...args) {
loseFocus(data);
return;
} else {
if (event.keyCode > 95 && event.keyCode < 106) {
if ((event.keyCode > 95 && event.keyCode < 106) || (event.keyCode > 47 && event.keyCode < 58)) {
$inputs[i].value = event.key;
if (i !== $inputs.length - 1) $inputs[i + 1].focus();
event.preventDefault();
Expand Down
4 changes: 2 additions & 2 deletions dist/otpdesigner.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "otp-designer-jquery",
"version": "1.0.1",
"version": "1.0.2",
"description": "OTP-designer-jquery: Create custom OTP code inputs effortlessly! This jQuery plugin enables designers and developers to design visually appealing, secure OTP code input fields. Enjoy seamless integration and built-in validation events, ensuring a delightful user experience. Simplify OTP input implementation with ease.",
"keywords": [
"jquery",
Expand Down Expand Up @@ -41,4 +41,4 @@
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4"
}
}
}
2 changes: 1 addition & 1 deletion src/otpdesigner.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const otpdesigner = function (options = {}, ...args) {
loseFocus(data);
return;
} else {
if (event.keyCode > 95 && event.keyCode < 106) {
if ((event.keyCode > 95 && event.keyCode < 106) || (event.keyCode > 47 && event.keyCode < 58)) {
$inputs[i].value = event.key;
if (i !== $inputs.length - 1) $inputs[i + 1].focus();
event.preventDefault();
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const webpack = require("webpack");
// noinspection JSUnresolvedReference
let bannerPlugin = new webpack.BannerPlugin({
banner: `/*!
* OTP-designer-jquery v1.0.0
* OTP-designer-jquery v1.0.2
* (c) HichemTech
* Released under the MIT License.
* Github: github.com/HichemTab-tech/OTP-designer-jquery
Expand Down

0 comments on commit d4bc444

Please sign in to comment.