Skip to content

Commit

Permalink
noUiSlider 13.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersen committed Mar 13, 2019
1 parent e759452 commit 9921f26
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### 13.1.2 (*2019-03-13*)
- Fixed: Handle disappears in Safari on tap (#927);
- Fixed: Disabled slider still accepts keyboard interaction (#953);

### 13.1.1 (*2019-02-14*)
- Fixed: Slider hang when using a zero-length range (#948);

Expand Down
6 changes: 5 additions & 1 deletion distribute/nouislider.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! nouislider - 13.1.1 - 2/14/2019 */
/*! nouislider - 13.1.2 - 3/13/2019 */
/* Functional styling;
* These styles are required for noUiSlider to function.
* You don't need to change these rules to apply your design.
Expand Down Expand Up @@ -44,7 +44,9 @@
width: 100%;
-ms-transform-origin: 0 0;
-webkit-transform-origin: 0 0;
-webkit-transform-style: preserve-3d;
transform-origin: 0 0;
transform-style: flat;
}
/* Offset direction
*/
Expand All @@ -62,6 +64,8 @@ html:not([dir="rtl"]) .noUi-horizontal .noUi-origin {
height: 0;
}
.noUi-handle {
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
position: absolute;
}
.noUi-touch-area {
Expand Down
12 changes: 8 additions & 4 deletions distribute/nouislider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! nouislider - 13.1.1 - 2/14/2019 */
/*! nouislider - 13.1.2 - 3/13/2019 */
(function(factory) {
if (typeof define === "function" && define.amd) {
// AMD. Register as an anonymous module.
Expand All @@ -13,7 +13,7 @@
})(function() {
"use strict";

var VERSION = "13.1.1";
var VERSION = "13.1.2";

//region Helper Methods

Expand Down Expand Up @@ -1104,6 +1104,10 @@
return addNodeTo(handle.firstChild, options.cssClasses.tooltip);
}

function isSliderDisabled() {
return scope_Target.hasAttribute("disabled");
}

// Disable the slider dragging if any handle is disabled
function isHandleDisabled(handleNumber) {
var handleOrigin = scope_Handles[handleNumber];
Expand Down Expand Up @@ -1443,7 +1447,7 @@

// doNotReject is passed by all end events to make sure released touches
// are not rejected, leaving the slider "stuck" to the cursor;
if (scope_Target.hasAttribute("disabled") && !data.doNotReject) {
if (isSliderDisabled() && !data.doNotReject) {
return false;
}

Expand Down Expand Up @@ -1783,7 +1787,7 @@
// Handles keydown on focused handles
// Don't move the document when pressing arrow keys on focused handles
function eventKeydown(event, handleNumber) {
if (isHandleDisabled(handleNumber)) {
if (isSliderDisabled() || isHandleDisabled(handleNumber)) {
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions distribute/nouislider.min.css

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

4 changes: 2 additions & 2 deletions distribute/nouislider.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nouislider",
"version": "13.1.1",
"version": "13.1.2",
"main": "distribute/nouislider.js",
"style": "distribute/nouislider.min.css",
"license": "MIT",
Expand Down

0 comments on commit 9921f26

Please sign in to comment.