[SSE] Fix bug 44946

This commit is contained in:
JuliaSvinareva 2020-08-25 21:43:32 +03:00
parent f6362a9fe0
commit 2a1ff38a02
3 changed files with 25 additions and 5 deletions

View file

@ -555,12 +555,17 @@ define([
this.checkInvisible(suppress);
} else if ( index >= (this.tabs.length - 1) || index == 'last') {
var tab = this.tabs[this.tabs.length-1].$el;
if (this.$bar.find('.separator-item').length === 0) {
this.$bar.append('<li class="separator-item"><span></span></li>');
}
this.$bar.scrollLeft(this.$bar.scrollLeft() + (tab.position().left + parseInt(tab.css('width')) - this.$bar.width()) + (this.$bar.width() > 400 ? 20 : 5));
this.checkInvisible(suppress);
} else {
if (!this.isTabVisible(this.tabs.length - 1) && this.$bar.find('.separator-item').length === 0) {
this.$bar.append('<li class="separator-item"><span></span></li>');
}
var rightbound = this.$bar.width(),
tab, right, left;
if (index == 'forward') {
for (var i = 0; i < this.tabs.length; i++) {
tab = this.tabs[i].$el;
@ -636,7 +641,7 @@ define([
//left = tab.position().left;
//right = left + tab.width();
return !(left < leftbound) && !(right - rightbound > 0.1);
return !(left < leftbound) && !(right - rightbound > 0.5);
}
return false;

View file

@ -41,9 +41,6 @@
cursor: pointer;
}
}
&:last-of-type {
margin-right: 20px;
}
}
&.bottom {

View file

@ -166,6 +166,12 @@
}
}
&:last-of-type {
span {
margin-right: 0;
}
}
> span {
display: inline-block;
.border-radius(0);
@ -266,6 +272,18 @@
}
}
}
&.separator-item {
margin-left: 20px;
width: 1px;
> span {
padding: 0;
margin: 0;
width: 1px;
&::after {
content: none;
}
}
}
}
}