input-duration 2.1.1 → 2.2.1
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/README.md +6 -6
- package/index.js +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,13 +52,12 @@
|
|
|
52
52
|
<div>
|
|
53
53
|
</div>
|
|
54
54
|
<div align="center">
|
|
55
|
-
<a href="https://6mxpg2.csb.app/" target="_blank">Demo</a>
|
|
56
|
-
·
|
|
57
|
-
<a href="https://stephanluis.github.io/input-duration/" target="_blank">Docs</a>
|
|
58
|
-
·
|
|
59
55
|
<a href="https://codesandbox.io/s/peaceful-waterfall-6mxpg2?file=/index.html" target="_blank">
|
|
60
56
|
Fiddle
|
|
61
|
-
</a>
|
|
57
|
+
</a> ·
|
|
58
|
+
<a href="https://6mxpg2.csb.app/" target="_blank">Demo</a>
|
|
59
|
+
·
|
|
60
|
+
<a href="https://stephanluis.github.io/input-duration/" target="_blank">Docs</a>
|
|
62
61
|
·
|
|
63
62
|
<a href="https://github.com/StephanLuis/input-duration/issues">Bugs</a>
|
|
64
63
|
·
|
|
@@ -115,6 +114,7 @@ Time inputs <input type='time'> are updated by browsers in unwanted ways! Safa
|
|
|
115
114
|
<img src="readme/codeDrawing.png" alt="drawing" width="60%"/>
|
|
116
115
|
|
|
117
116
|
<!-- [![HTML Screen Shot][html-screenshot]](https://example.com) -->
|
|
117
|
+
*note input-duration needs closing tag!
|
|
118
118
|
|
|
119
119
|
<h3> Bob is rescued by INPUT-DURATION! </h3>
|
|
120
120
|
|
|
@@ -222,7 +222,7 @@ import chronlyhms from 'https://cdn.jsdelivr.net/npm/input-duration/+esm'
|
|
|
222
222
|
<!-- USAGE EXAMPLES -->
|
|
223
223
|
## Usage
|
|
224
224
|
|
|
225
|
-
input-duration requires a
|
|
225
|
+
input-duration requires a `<input-duration>` element . There's no more HTML than that, but don't forget the closing tag. Native Input elements don't have them!
|
|
226
226
|
```sh
|
|
227
227
|
|
|
228
228
|
<input-duration id='bob'></input-duration>
|
package/index.js
CHANGED
|
@@ -141,6 +141,7 @@ class InputDuration extends HTMLElement {
|
|
|
141
141
|
this.addNumericInput();
|
|
142
142
|
this.addClicksToActivate();
|
|
143
143
|
this.nonNumericBugInHTML();
|
|
144
|
+
this.removeEprop();
|
|
144
145
|
|
|
145
146
|
}
|
|
146
147
|
|
|
@@ -574,7 +575,21 @@ class InputDuration extends HTMLElement {
|
|
|
574
575
|
}));
|
|
575
576
|
}
|
|
576
577
|
|
|
578
|
+
/**
|
|
579
|
+
* Stop event propigation from the timeCase up through the DOM so when keys
|
|
580
|
+
* are being used they don't affect other controls (like volume on plyr)
|
|
581
|
+
* @method
|
|
582
|
+
*/
|
|
583
|
+
|
|
584
|
+
removeEprop() {
|
|
585
|
+
|
|
586
|
+
document.querySelector('input-duration').shadowRoot.querySelector('.timeCase')
|
|
587
|
+
.addEventListener('keydown', function (event) { event.stopPropagation();});
|
|
577
588
|
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
|
|
578
593
|
// formatting and behaviour options
|
|
579
594
|
|
|
580
595
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "input-duration",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"author": "Stephan Luis <stephan@learnsense.org>",
|
|
5
5
|
"description": "This is the 'Input-Duration'! It is a webcomponent that provides an hour, minute, second, and millisecond control for HTML5.",
|
|
6
6
|
"browser": "indexjs",
|