|
1159 | 1159 | this.ticks.on('touchstart', angular.bind(this, this.onMove, this.ticks));
|
1160 | 1160 |
|
1161 | 1161 | if (this.options.keyboardSupport) {
|
1162 |
| - this.minH.on('focus', angular.bind(this, this.onPointerFocus, this.minH, 'rzSliderModel')) |
| 1162 | + this.minH.on('focus', angular.bind(this, this.onPointerFocus, this.minH, 'rzSliderModel')); |
1163 | 1163 | if (this.range) {
|
1164 | 1164 | this.maxH.on('focus', angular.bind(this, this.onPointerFocus, this.maxH, 'rzSliderHigh'));
|
1165 | 1165 | }
|
|
1269 | 1269 | this.callOnEnd();
|
1270 | 1270 | },
|
1271 | 1271 |
|
1272 |
| - onPointerFocus: function(pointer, ref, event) { |
| 1272 | + onPointerFocus: function(pointer, ref) { |
1273 | 1273 | this.tracking = ref;
|
1274 | 1274 | pointer.one('blur', angular.bind(this, this.onPointerBlur, pointer));
|
1275 | 1275 | pointer.on('keydown', angular.bind(this, this.onKeyboardEvent));
|
1276 | 1276 | pointer.addClass('rz-active');
|
1277 | 1277 | },
|
1278 | 1278 |
|
1279 |
| - onPointerBlur: function(pointer, event) { |
| 1279 | + onPointerBlur: function(pointer) { |
1280 | 1280 | pointer.off('keydown');
|
1281 | 1281 | this.tracking = '';
|
1282 | 1282 | pointer.removeClass('rz-active');
|
|
1312 | 1312 |
|
1313 | 1313 | var newValue = this.roundStep(this.sanitizeValue(action)),
|
1314 | 1314 | newOffset = this.valueToOffset(newValue);
|
1315 |
| - var switched = this.positionTrackingHandle(newValue, newOffset); |
1316 |
| - if (switched) { |
1317 |
| - var pointer = this.tracking === 'rzSliderModel' ? this.minH : this.maxH; |
1318 |
| - pointer[0].focus(); //to focus the correct pointer |
1319 |
| - } |
| 1315 | + this.positionTrackingHandle(newValue, newOffset); |
1320 | 1316 | },
|
1321 | 1317 |
|
1322 | 1318 | /**
|
|
1421 | 1417 | this.tracking = 'rzSliderHigh';
|
1422 | 1418 | this.minH.removeClass('rz-active');
|
1423 | 1419 | this.maxH.addClass('rz-active');
|
| 1420 | + if (this.options.keyboardSupport) |
| 1421 | + this.maxH[0].focus(); |
1424 | 1422 | valueChanged = true;
|
1425 | 1423 | } else if (this.tracking === 'rzSliderHigh' && newValue <= this.scope.rzSliderModel) {
|
1426 | 1424 | this.scope[this.tracking] = this.scope.rzSliderModel;
|
|
1429 | 1427 | this.tracking = 'rzSliderModel';
|
1430 | 1428 | this.maxH.removeClass('rz-active');
|
1431 | 1429 | this.minH.addClass('rz-active');
|
| 1430 | + if (this.options.keyboardSupport) |
| 1431 | + this.minH[0].focus(); |
1432 | 1432 | valueChanged = true;
|
1433 | 1433 | }
|
1434 | 1434 | }
|
|
0 commit comments