From dc07caf43d33424d7a3a9e02b9e27504d2212c56 Mon Sep 17 00:00:00 2001 From: Forrest Date: Fri, 10 Nov 2023 17:38:32 -0500 Subject: [PATCH 1/3] fix(MessageItem): allow user to select text --- src/components/MessageItem.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/MessageItem.vue b/src/components/MessageItem.vue index df44920d1..1e5f8191b 100644 --- a/src/components/MessageItem.vue +++ b/src/components/MessageItem.vue @@ -75,9 +75,11 @@ export default defineComponent({ flex-flow: row; justify-content: space-between; align-items: center; + user-select: text; } .details { white-space: break-spaces; + user-select: text; } From ad639010f8a2d4d8b1094bb6a84b450fb495a934 Mon Sep 17 00:00:00 2001 From: Forrest Date: Fri, 10 Nov 2023 17:38:49 -0500 Subject: [PATCH 2/3] fix(useResizeObserver): disconnect on unmount --- src/composables/useResizeObserver.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/composables/useResizeObserver.ts b/src/composables/useResizeObserver.ts index e7e6c7afb..c4e348b5a 100644 --- a/src/composables/useResizeObserver.ts +++ b/src/composables/useResizeObserver.ts @@ -1,4 +1,4 @@ -import { onBeforeUnmount, Ref, unref, watch } from 'vue'; +import { onBeforeUnmount, Ref, watch } from 'vue'; /** * Invokes a callback whenever an element is resized. @@ -27,10 +27,7 @@ export function useResizeObserver( ); onBeforeUnmount(() => { - const targetEl = unref(targetElRef); - if (targetEl) { - observer.unobserve(targetEl); - } + observer.disconnect(); }); return observer; From c9c6270cd90d471491bf2e237d261b3173762d99 Mon Sep 17 00:00:00 2001 From: Forrest Date: Fri, 10 Nov 2023 17:39:06 -0500 Subject: [PATCH 3/3] fix(useGlobalErrorHook): fallback to event.message Also log out the global error --- src/composables/useGlobalErrorHook.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/composables/useGlobalErrorHook.ts b/src/composables/useGlobalErrorHook.ts index c8c1696e6..506b6e024 100644 --- a/src/composables/useGlobalErrorHook.ts +++ b/src/composables/useGlobalErrorHook.ts @@ -5,7 +5,11 @@ export function useGlobalErrorHook() { const messageStore = useMessageStore(); const onError = (event: ErrorEvent) => { - messageStore.addError('Application error (click for details)', event.error); + console.error(event); + const details = event.error + ? event.error + : { details: event.message ?? 'Unknown error' }; + messageStore.addError('Application error (click for details)', details); }; onMounted(() => {