[assist] Prevent interval from firing when the multiLineEllipsis binding is expanded
$expandLink.appendTo(self.$element);
$expandLink.add(textElement).click(function (e) {
self.expanded(!self.expanded());
- console.log(self.expanded());
self.updateOverflowHeight();
if (self.expanded()) {
if (self.expandClass) {
self.onActionRender(self.$element, checkOverflow(self.element));
}
- if (self.expanded()) {
- return;
- }
-
self.isOverflowing = false;
+ if (!self.expanded()) {
while (checkOverflow(self.element)) {
self.isOverflowing = true;
var contents = $(textElement).contents();
textElement.removeChild(lastContent)
}
}
+ }
if (ko.isObservable(self.overflowing) && self.overflowing() !== self.isOverflowing) {
self.overflowing(self.isOverflowing);
