mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 04:03:57 -06:00
FIX: do not set VH while zooming (#21538)
This was an optimisation I mistakenly removed from 4cfa78c3f3
This commit is contained in:
parent
4cfa78c3f3
commit
3f2c16a8d7
@ -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 {
|
||||
|
||||
@bind
|
||||
setVH() {
|
||||
if (isZoomed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const vh = (this.activeWindow?.height || window.innerHeight) * 0.01;
|
||||
|
||||
if (lastVH === vh) {
|
||||
|
Loading…
Reference in New Issue
Block a user