bootstrap-input-spinner 3.1.10 → 3.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bootstrap-input-spinner",
3
- "version": "3.1.10",
3
+ "version": "3.1.12",
4
4
  "description": "A Bootstrap 5 / jQuery plugin to create input spinner elements for number input.",
5
5
  "browser": "./src/bootstrap-input-spinner.js",
6
6
  "scripts": {
@@ -161,6 +161,9 @@
161
161
  newValue = $original[0].inputSpinnerEditor.parse(newValue)
162
162
  setValue(newValue, focusOut)
163
163
  dispatchEvent($original, event.type)
164
+ if (props.keyboardStepping && focusOut) { // stop stepping
165
+ resetTimer()
166
+ }
164
167
  }).on("keydown", function (event) {
165
168
  if (props.keyboardStepping) {
166
169
  if (event.which === 38) { // up arrow pressed
package/test/Test.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {describe, it, assert} from "../node_modules/teevi/src/teevi.js"
2
2
 
3
3
  describe('bootstrap-input-spinner', function () {
4
- it('Should display the spinner', function () {
4
+ it('Should display and destroy the spinner', function () {
5
5
  addInput()
6
6
  const $input = $("input[type='number']")
7
7
  $input.inputSpinner()
@@ -14,4 +14,4 @@ function addInput() {
14
14
  var input = document.createElement("input")
15
15
  input.type = "number"
16
16
  testContainer.append(input)
17
- }
17
+ }