From 109bceb924832c8f937e8e175faa977a7d8d2009 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 17 Apr 2019 22:58:18 -0600 Subject: [PATCH] Make ngbtooltip happier and not remount When we use detectChanges(), ngbTooltip gets annoyed at us and stops working correctly. This commit also cleans up some of the attributes on the sticker button. Fixes https://github.com/turt2live/matrix-dimension/issues/276 --- .../sticker-picker/sticker-picker.component.html | 3 ++- .../widget-wrappers/sticker-picker/sticker-picker.component.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/app/widget-wrappers/sticker-picker/sticker-picker.component.html b/web/app/widget-wrappers/sticker-picker/sticker-picker.component.html index 2a8e348..5578d86 100644 --- a/web/app/widget-wrappers/sticker-picker/sticker-picker.component.html +++ b/web/app/widget-wrappers/sticker-picker/sticker-picker.component.html @@ -25,7 +25,8 @@
- +
diff --git a/web/app/widget-wrappers/sticker-picker/sticker-picker.component.ts b/web/app/widget-wrappers/sticker-picker/sticker-picker.component.ts index a1522ab..11f705d 100644 --- a/web/app/widget-wrappers/sticker-picker/sticker-picker.component.ts +++ b/web/app/widget-wrappers/sticker-picker/sticker-picker.component.ts @@ -127,7 +127,7 @@ export class StickerPickerWidgetWrapperComponent extends CapableWidget implement this.packs = packs.filter(p => p.isSelected); console.log("User has " + this.packs.length + "/" + packs.length + " sticker packs selected"); this.isLoading = false; - this.changeDetector.detectChanges(); + this.changeDetector.markForCheck(); } catch (e) { console.error(e); }