mirror of
https://github.com/discourse/discourse.git
synced 2025-06-08 14:26:21 +08:00
FIX: do not set VH while zooming (#21538)
This was an optimisation I mistakenly removed from 4cfa78c3f3
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
import { bind } from "discourse-common/utils/decorators";
|
import { bind } from "discourse-common/utils/decorators";
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import { inject as service } from "@ember/service";
|
import { inject as service } from "@ember/service";
|
||||||
|
import isZoomed from "discourse/plugins/chat/discourse/lib/zoom-check";
|
||||||
|
|
||||||
const CSS_VAR = "--chat-vh";
|
const CSS_VAR = "--chat-vh";
|
||||||
let lastVH;
|
let lastVH;
|
||||||
@ -31,6 +32,10 @@ export default class ChatVh extends Component {
|
|||||||
|
|
||||||
@bind
|
@bind
|
||||||
setVH() {
|
setVH() {
|
||||||
|
if (isZoomed()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const vh = (this.activeWindow?.height || window.innerHeight) * 0.01;
|
const vh = (this.activeWindow?.height || window.innerHeight) * 0.01;
|
||||||
|
|
||||||
if (lastVH === vh) {
|
if (lastVH === vh) {
|
||||||
|
Reference in New Issue
Block a user