Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: get the input focus listener #76

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# NPM
package-lock.json

# Node Modules
node_modules/
Expand Down
10 changes: 8 additions & 2 deletions build/kioskboard-aio.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*!
* KioskBoard - Virtual Keyboard ('https://github.com/furcan/KioskBoard')
* Description: This file contains the KioskBoard CSS codes as internal to use the KioskBoard as one file. This file has been created automatically from using the "kioskboard.js", and "kioskboard.css" files.
* Version: 2.3.0
* Version: 2.3.1
* Author: Furkan ('https://github.com/furcan')
* Copyright 2022 KioskBoard - Virtual Keyboard, MIT Licence ('https://opensource.org/licenses/MIT')*
* Copyright 2023 KioskBoard - Virtual Keyboard, MIT Licence ('https://opensource.org/licenses/MIT')*
*/

/* global define */
Expand Down Expand Up @@ -72,6 +72,7 @@
};
var kioskBoardCachedKeys;
var kioskBoardNewOptions;
var kioskboardFocusListener;
var kioskBoardGithubUrl = 'https://github.com/furcan/KioskBoard';
var kioskBoardSpecialCharacters = {
'0': '!',
Expand Down Expand Up @@ -876,6 +877,7 @@
// append keyboard: end
};
input.addEventListener('focus', inputFocusListener); // add input focus listener
kioskboardFocusListener = inputFocusListener;
// each input focus listener: end

// each input focusout listener: begin
Expand Down Expand Up @@ -947,6 +949,10 @@
}
// Step 3: Select the element(s): end
},
// Get focus listener
getFocusListener: function () {
return kioskboardFocusListener;
},
};

return KioskBoard;
Expand Down
3 changes: 0 additions & 3 deletions dist/kioskboard-2.3.0.min.js

This file was deleted.

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dist/kioskboard-2.3.1.min.js

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions dist/kioskboard-aio-2.3.0.min.js

This file was deleted.

3 changes: 3 additions & 0 deletions dist/kioskboard-aio-2.3.1.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*!
* KioskBoard - Virtual Keyboard ('https://github.com/furcan/KioskBoard')
* Version: 2.3.0
* Version: 2.3.1
* Description: TypeScript Declaration.
* Author: Furkan ('https://github.com/furcan')
* Copyright 2022 KioskBoard - Virtual Keyboard, MIT Licence ('https://opensource.org/licenses/MIT')*
* Copyright 2023 KioskBoard - Virtual Keyboard, MIT Licence ('https://opensource.org/licenses/MIT')*
*/

/**
Expand Down Expand Up @@ -188,6 +188,7 @@ declare namespace KioskBoard {
initOptions: IKioskBoardOptions,
): void;

function getFocusListener(): object;
}

export = KioskBoard;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "kioskboard",
"main": "dist/kioskboard-aio-2.3.0.min.js",
"main": "dist/kioskboard-aio-2.3.1.min.js",
"types": "index.d.ts",
"version": "2.3.0",
"version": "2.3.1",
"description": "A pure JavaScript library for using virtual keyboards.",
"homepage": "https://github.com/furcan/KioskBoard",
"files": [
Expand Down
10 changes: 8 additions & 2 deletions src/kioskboard.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*!
* KioskBoard - Virtual Keyboard ('https://github.com/furcan/KioskBoard')
* Version: 2.3.0
* Version: 2.3.1
* Author: Furkan ('https://github.com/furcan')
* Copyright 2022 KioskBoard - Virtual Keyboard, MIT Licence ('https://opensource.org/licenses/MIT')*
* Copyright 2023 KioskBoard - Virtual Keyboard, MIT Licence ('https://opensource.org/licenses/MIT')*
*/

/* global define */
Expand Down Expand Up @@ -71,6 +71,7 @@
};
var kioskBoardCachedKeys;
var kioskBoardNewOptions;
var kioskboardFocusListener;
var kioskBoardGithubUrl = 'https://github.com/furcan/KioskBoard';
var kioskBoardSpecialCharacters = {
'0': '!',
Expand Down Expand Up @@ -875,6 +876,7 @@
// append keyboard: end
};
input.addEventListener('focus', inputFocusListener); // add input focus listener
kioskboardFocusListener = inputFocusListener;
// each input focus listener: end

// each input focusout listener: begin
Expand Down Expand Up @@ -946,6 +948,10 @@
}
// Step 3: Select the element(s): end
},
// Get focus listener
getFocusListener: function () {
return kioskboardFocusListener;
},
};

return KioskBoard;
Expand Down