A platform for community discussion. Free, open, simple.
FIX: do not set VH while zooming (#21538)
Joffrey JAFFEUX3f2c16a8d7fa
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-vh.js b/plugins/chat/assets/javascripts/discourse/components/chat-vh.jsindex 392652a3d56..952706fa5ca 100644--- a/plugins/chat/assets/javascripts/discourse/components/chat-vh.js+++ b/plugins/chat/assets/javascripts/discourse/components/chat-vh.js@@ -1,6 +1,7 @@import { bind } from "discourse-common/utils/decorators";import Component from "@ember/component";import { inject as service } from "@ember/service";+import isZoomed from "discourse/plugins/chat/discourse/lib/zoom-check";const CSS_VAR = "--chat-vh";let lastVH;@@ -31,6 +32,10 @@ export default class ChatVh extends Component {@bindsetVH() {+ if (isZoomed()) {+ return;+ }+const vh = (this.activeWindow?.height || window.innerHeight) * 0.01;if (lastVH === vh) {