fix focus on current time in IE

This commit is contained in:
t1m0n 2016-04-01 11:07:39 +03:00
parent bc6960aad4
commit 84bfbe9a45
6 changed files with 16 additions and 12 deletions

View File

@ -455,8 +455,8 @@
bottom: -2px;
z-index: -1;
opacity: 0; }
.datepicker--time-current-hours.active:after,
.datepicker--time-current-minutes.active:after {
.datepicker--time-current-hours.-focus-:after,
.datepicker--time-current-minutes.-focus-:after {
opacity: 1; }
.datepicker--time-current-ampm {

File diff suppressed because one or more lines are too long

View File

@ -1867,7 +1867,7 @@ var Datepicker;
this.d.$el.on('selectDate', this._onSelectDate.bind(this));
this.$ranges.on(input, this._onChangeRange.bind(this));
this.$ranges.on('mouseenter', this._onMouseEnterRange.bind(this));
this.$ranges.on('mouseout', this._onMouseOutRange.bind(this));
this.$ranges.on('mouseout blur', this._onMouseOutRange.bind(this));
},
_setInitialTime: function (date, parse) {
@ -2072,12 +2072,14 @@ var Datepicker;
_onMouseEnterRange: function (e) {
var name = $(e.target).attr('name');
$('.datepicker--time-current-' + name, this.$timepicker).addClass('active');
this.rangInFocus = name;
$('.datepicker--time-current-' + name, this.$timepicker).addClass('-focus-');
},
_onMouseOutRange: function (e) {
var name = $(e.target).attr('name');
$('.datepicker--time-current-' + name, this.$timepicker).removeClass('active');
if (this.d.inFocus) return; // Prevent removing focus when mouse out of range slider
$('.datepicker--time-current-' + name, this.$timepicker).removeClass('-focus-');
}
};
})(window, jQuery, Datepicker);

File diff suppressed because one or more lines are too long

View File

@ -35,7 +35,7 @@
this.d.$el.on('selectDate', this._onSelectDate.bind(this));
this.$ranges.on(input, this._onChangeRange.bind(this));
this.$ranges.on('mouseenter', this._onMouseEnterRange.bind(this));
this.$ranges.on('mouseout', this._onMouseOutRange.bind(this));
this.$ranges.on('mouseout blur', this._onMouseOutRange.bind(this));
},
_setInitialTime: function (date, parse) {
@ -240,12 +240,14 @@
_onMouseEnterRange: function (e) {
var name = $(e.target).attr('name');
$('.datepicker--time-current-' + name, this.$timepicker).addClass('active');
this.rangInFocus = name;
$('.datepicker--time-current-' + name, this.$timepicker).addClass('-focus-');
},
_onMouseOutRange: function (e) {
var name = $(e.target).attr('name');
$('.datepicker--time-current-' + name, this.$timepicker).removeClass('active');
if (this.d.inFocus) return; // Prevent removing focus when mouse out of range slider
$('.datepicker--time-current-' + name, this.$timepicker).removeClass('-focus-');
}
};
})(window, jQuery, Datepicker);

View File

@ -119,7 +119,7 @@ $rangeThumbBg: #dedede;
opacity: 0;
}
&.active {
&.-focus- {
&:after {
opacity: 1;
}