Skip to content

Commit a11028f

Browse files
committed
1.29.0
1 parent d80095f commit a11028f

9 files changed

+33
-31
lines changed

Diff for: README.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ Wiki: [Home](https://github.com/Mottie/Keyboard/wiki/Home) | [FAQ](https://githu
147147

148148
Only the latest changes will be shown below, see the [wiki log](https://github.com/Mottie/Keyboard/wiki/Log) to view older versions.
149149

150+
### Version 1.29.0 (2019-05-02)
151+
152+
* Core:
153+
* Update to work with jQuery v3.4+.
154+
* Docs:
155+
* Update jQuery & UI (using slim & custom jQuery UI).
156+
150157
### Version 1.28.9 (2019-03-09)
151158

152159
* Core:
@@ -171,11 +178,3 @@ Only the latest changes will be shown below, see the [wiki log](https://github.c
171178
* Add VueVirtualKeyboard link.
172179
* Meta:
173180
* Update dependencies.
174-
175-
### Version 1.28.7 (2018-10-09)
176-
177-
* Core:
178-
* Fix JS Error. Closes [issue #699](https://github.com/Mottie/Keyboard/issues/699).
179-
* Readme:
180-
* Fix Usability (spelling error). See [PR #694](https://github.com/Mottie/Keyboard/pull/694); thanks [@0xflotus](https://github.com/0xflotus)!
181-
* Fix comboRegex (spelling error). See [PR #695](https://github.com/Mottie/Keyboard/pull/695); thanks [@0xflotus](https://github.com/0xflotus)!

Diff for: dist/js/jquery.keyboard.extension-all.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/js/jquery.keyboard.js

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery UI Virtual Keyboard v1.28.9 *//*
1+
/*! jQuery UI Virtual Keyboard v1.29.0 *//*
22
Author: Jeremy Satterfield
33
Maintained: Rob Garrison (Mottie on github)
44
Licensed under the MIT License
@@ -42,7 +42,7 @@ http://www.opensource.org/licenses/mit-license.php
4242
var $keyboard = $.keyboard = function (el, options) {
4343
var o, base = this;
4444

45-
base.version = '1.28.9';
45+
base.version = '1.29.0';
4646

4747
// Access to jQuery and DOM versions of element
4848
base.$el = $(el);
@@ -90,7 +90,7 @@ http://www.opensource.org/licenses/mit-license.php
9090
// flag indication that a keyboard is open
9191
base.isOpen = false;
9292
// is mousewheel plugin loaded?
93-
base.wheel = $.isFunction($.fn.mousewheel);
93+
base.wheel = typeof $.fn.mousewheel === 'function';
9494
// special character in regex that need to be escaped
9595
base.escapeRegex = /[-\/\\^$*+?.()|[\]{}]/g;
9696
base.isTextArea = base.el.nodeName.toLowerCase() === 'textarea';
@@ -154,7 +154,7 @@ http://www.opensource.org/licenses/mit-license.php
154154
kbevents.kbBeforeClose,
155155
kbevents.inputRestricted
156156
], function (i, callback) {
157-
if ($.isFunction(o[callback])) {
157+
if (typeof o[callback] === 'function') {
158158
// bind callback functions within options to triggered events
159159
base.$el.bind(callback + base.namespace + 'callbacks', o[callback]);
160160
}
@@ -503,7 +503,7 @@ http://www.opensource.org/licenses/mit-license.php
503503
// some languages include a dash, e.g. 'en-gb' or 'fr-ca'
504504
// allow o.language to be a string or array...
505505
// array is for future expansion where a layout can be set for multiple languages
506-
lang = ($.isArray(lang) ? lang[0] : lang);
506+
lang = (Object.prototype.toString.call(lang) === '[object Array]' ? lang[0] : lang);
507507
base.language = lang;
508508
lang = lang.split('-')[0];
509509

@@ -549,7 +549,7 @@ http://www.opensource.org/licenses/mit-license.php
549549

550550
base.updateLanguage();
551551
if (typeof $keyboard.builtLayouts[base.layout] === 'undefined') {
552-
if ($.isFunction(o.create)) {
552+
if (typeof o.create === 'function') {
553553
// create must call buildKeyboard() function; or create it's own keyboard
554554
base.$keyboard = o.create(base);
555555
} else if (!base.$keyboard.length) {
@@ -938,14 +938,14 @@ http://www.opensource.org/licenses/mit-license.php
938938

939939
// change callback is no longer bound to the input element as the callback could be
940940
// called during an external change event with all the necessary parameters (issue #157)
941-
if ($.isFunction(o.change)) {
941+
if (typeof o.change === 'function') {
942942
event.type = $keyboard.events.inputChange;
943943
o.change(event, base, base.el);
944944
return false;
945945
}
946946
if (o.acceptValid && o.autoAcceptOnValid) {
947947
if (
948-
$.isFunction(o.validate) &&
948+
typeof o.validate === 'function' &&
949949
o.validate(base, base.getValue(base.$preview))
950950
) {
951951
base.$preview.blur();
@@ -1149,7 +1149,7 @@ http://www.opensource.org/licenses/mit-license.php
11491149
// keyaction is added as a string, override original action & text
11501150
if (action === last.key && typeof $keyboard.keyaction[action] === 'string') {
11511151
last.key = action = $keyboard.keyaction[action];
1152-
} else if (action in $keyboard.keyaction && $.isFunction($keyboard.keyaction[action])) {
1152+
} else if (action in $keyboard.keyaction && typeof $keyboard.keyaction[action] === 'function') {
11531153
// stop processing if action returns false (close & cancel)
11541154
if ($keyboard.keyaction[action](base, this, e) === false) {
11551155
return false;
@@ -1178,7 +1178,7 @@ http://www.opensource.org/licenses/mit-license.php
11781178
last.preVal = '' + last.val;
11791179
base.saveLastChange();
11801180

1181-
if ($.isFunction(o.change)) {
1181+
if (typeof o.change === 'function') {
11821182
e.type = $keyboard.events.inputChange;
11831183
o.change(e, base, base.el);
11841184
// return false to prevent reopening keyboard if base.accept() was called
@@ -1218,7 +1218,7 @@ http://www.opensource.org/licenses/mit-license.php
12181218
clearTimeout(base.repeater); // make sure key repeat stops!
12191219
if (o.acceptValid && o.autoAcceptOnValid) {
12201220
if (
1221-
$.isFunction(o.validate) &&
1221+
typeof o.validate === 'function' &&
12221222
o.validate(base, base.getValue())
12231223
) {
12241224
base.$preview.blur();
@@ -1674,7 +1674,7 @@ http://www.opensource.org/licenses/mit-license.php
16741674
var kbcss = $keyboard.css,
16751675
$accept = base.$keyboard.find('.' + kbcss.keyPrefix + 'accept'),
16761676
valid = true;
1677-
if ($.isFunction(o.validate)) {
1677+
if (typeof o.validate === 'function') {
16781678
valid = o.validate(base, base.getValue(), false);
16791679
}
16801680
// toggle accept button classes; defined in the css
@@ -1726,7 +1726,7 @@ http://www.opensource.org/licenses/mit-license.php
17261726
// goToNext = true, then go to next input; if false go to prev
17271727
// isAccepted is from autoAccept option or true if user presses shift+enter
17281728
base.switchInput = function (goToNext, isAccepted) {
1729-
if ($.isFunction(o.switchInput)) {
1729+
if (typeof o.switchInput === 'function') {
17301730
o.switchInput(base, goToNext, isAccepted);
17311731
} else {
17321732
// base.$keyboard may be an empty array - see #275 (apod42)
@@ -1775,7 +1775,7 @@ http://www.opensource.org/licenses/mit-license.php
17751775
kbevents = $keyboard.events,
17761776
val = accepted ? base.checkCombos() : base.originalContent;
17771777
// validate input if accepted
1778-
if (accepted && $.isFunction(o.validate) && !o.validate(base, val, true)) {
1778+
if (accepted && typeof o.validate === 'function' && !o.validate(base, val, true)) {
17791779
val = base.originalContent;
17801780
accepted = false;
17811781
if (o.cancelClose) {
@@ -2435,6 +2435,9 @@ http://www.opensource.org/licenses/mit-license.php
24352435
if (base.$keyboard.length) {
24362436
base.removeKeyboard();
24372437
}
2438+
if (base.options.openOn) {
2439+
base.removeBindings(base.options.openOn);
2440+
}
24382441
base.removeBindings(base.namespace);
24392442
base.removeBindings(base.namespace + 'callbacks');
24402443
for (index = 0; index < len; index++) {

Diff for: dist/js/jquery.keyboard.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: js/jquery.keyboard.extension-all.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀▀██
55
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
66
*/
7-
/*! jQuery UI Virtual Keyboard (1.28.9) - ALL Extensions + Mousewheel */
7+
/*! jQuery UI Virtual Keyboard (1.29.0) - ALL Extensions + Mousewheel */
88
/*! jQuery UI Virtual Keyboard Alt Key Popup v2.0.0 *//*
99
* for Keyboard v1.18+ only (2018-04-19)
1010
*

Diff for: js/jquery.keyboard.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery UI Virtual Keyboard v1.28.9 *//*
1+
/*! jQuery UI Virtual Keyboard v1.29.0 *//*
22
Author: Jeremy Satterfield
33
Maintained: Rob Garrison (Mottie on github)
44
Licensed under the MIT License
@@ -42,7 +42,7 @@ http://www.opensource.org/licenses/mit-license.php
4242
var $keyboard = $.keyboard = function (el, options) {
4343
var o, base = this;
4444

45-
base.version = '1.28.9';
45+
base.version = '1.29.0';
4646

4747
// Access to jQuery and DOM versions of element
4848
base.$el = $(el);

Diff for: keyboard.jquery.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "keyboard",
33
"title": "Keyboard",
4-
"version": "1.28.9",
4+
"version": "1.29.0",
55
"description": "Virtual Keyboard using jQuery UI",
66
"author": {
77
"name": "Jeremy Satterfield",

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "virtual-keyboard",
33
"title": "Keyboard",
44
"description": "Virtual Keyboard using jQuery UI",
5-
"version": "1.28.9",
5+
"version": "1.29.0",
66
"author": {
77
"name": "Jeremy Satterfield",
88
"url": "https://github.com/jsatt"

Diff for: testing/testing.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ jQuery(function($){
222222
setTimeout(function(){
223223
keyboard.destroy(function(){
224224
assert.equal( el.className, 'testing-abc', 'Destory removed all added class names' );
225-
assert.equal( $.isEmptyObject( $._data( el ) ), true, 'Destory removed all data & bindings' );
225+
assert.equal( $.isEmptyObject( $._data( el ).events ), true, 'Destory removed all data & bindings' );
226226
assert.equal( typeof $('#test input').getkeyboard(), 'undefined', 'Cleared up data' );
227227
done();
228228
});

0 commit comments

Comments
 (0)