You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
method avatarUrlGenerator() is called with method loadAvatarUrl(), which is called in mounted hook, but returns different result from the second attempt
parameter --background-invert-if-dark: invert(100%) is defined by app theme (dark.css) and remains the same in process
So the conclusion is, result of window.getComputedStyle() call is inconsistent due to different browsers and security reasons
Changing the attribute from this.$el to document.bodyin this place works, because body and its style aren't changing, unlike the unmounted and mounted again avatar.
Here are some research results:
avatarUrlGenerator()
inNcAvatar.vue
Related PR: https://github.com/nextcloud/nextcloud-vue/pull/3119/files
avatarUrlGenerator()
is called with methodloadAvatarUrl()
, which is called inmounted
hook, but returns different result from the second attempt--background-invert-if-dark: invert(100%)
is defined by app theme (dark.css) and remains the same in processSo the conclusion is, result of
window.getComputedStyle()
call is inconsistent due to different browsers and security reasonsChanging the attribute from
this.$el
todocument.body
in this place works, becausebody
and its style aren't changing, unlike the unmounted and mounted again avatar.Originally posted by @Antreesy in nextcloud/spreed#8625 (comment)
The text was updated successfully, but these errors were encountered: