🐛 Fix jittering on firefox scroll fixed elements

This commit is contained in:
Alejandro Alonso 2022-08-30 10:41:15 +02:00
parent 77118a3cc7
commit c69bf9fd35
5 changed files with 49 additions and 19 deletions

View file

@ -484,11 +484,21 @@
(when (some? element)
(.-scrollTop element)))
(defn get-h-scroll-pos
[^js element]
(when (some? element)
(.-scrollLeft element)))
(defn set-scroll-pos!
[^js element scroll]
(when (some? element)
(obj/set! element "scrollTop" scroll)))
(defn set-h-scroll-pos!
[^js element scroll]
(when (some? element)
(obj/set! element "scrollLeft" scroll)))
(defn scroll-into-view!
([^js element]
(scroll-into-view! element false))

View file

@ -15,15 +15,10 @@
'use strict';
goog.provide("app.util.normalize_wheel");
goog.provide("app.util.dom.normalize_wheel");
goog.scope(function() {
const self = app.util.normalize_wheel;
// const UserAgent_DEPRECATED = require('UserAgent_DEPRECATED');
// const isEventSupported = require('isEventSupported');
const self = app.util.dom.normalize_wheel;
// Reasonable defaults
const PIXEL_STEP = 10;
@ -174,6 +169,5 @@ goog.scope(function() {
self.normalize_wheel = normalizeWheel;
});