Bug 567062 Wrong number in "x more" recipients button for singleline case. r=bwinton,ui-r=andreasn

This commit is contained in:
rsx11m.pub@gmail.com 2010-06-24 09:05:36 +01:00
Родитель fb3345f241
Коммит 94d0b40b8c
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -387,13 +387,18 @@
newAddressNode.clientWidth + this.commaNodeWidth:
newAddressNode.clientWidth;
curLineWidth += newLineWidth;
if (curLineWidth > availableWidth && i > 0) {
let overLineWidth = curLineWidth - availableWidth;
if (overLineWidth > 0 && i > 0) {
curLine++;
curLineWidth = newLineWidth;
}
// hide the last node spanning into the additional line (n>1)
if (curLine >= this.maxLinesBeforeMore && this.maxLinesBeforeMore > 1) {
// also hide it if <30px left after sliding the address (n=1)
if (curLine >= this.maxLinesBeforeMore &&
(this.maxLinesBeforeMore > 1 ||
newLineWidth - overLineWidth < 30)) {
aAddressesNode.lastChild.hidden = true;
i--;
}