aboutsummaryrefslogtreecommitdiff
path: root/internal/ui/static/js/touch_handler.js (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-03-20Replace a bunch of `let` with `const`Gravatar jvoisin 1-16/+13
According to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const > Many style guides (including MDN's) recommend using const over let whenever a variable is not reassigned in its scope. This makes the intent clear that a variable's type (or value, in the case of a primitive) can never change.
2024-03-10Fix JavaScript linter path in GitHub ActionsGravatar Frédéric Guillot 1-1/+1
2024-03-10Replace DomHelper.findParent with .closestGravatar jvoisin 1-1/+1
See https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
2024-01-23Revert "touch_handler: Fix scroll up behavior on Firefox Android"Gravatar Andrew Gunnerson 1-1/+1
This reverts commit 344a237af87e07c51ca73e3b6f1c23598613996d. The previous behavior is more correct due to the use of preventDefault() and the commit was introduced only as a workaround. As of [1], the underlying issue in Firefox has been fixed and downward swipes to scroll up are no longer ignored every other attempt. [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1847305 [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1853075 [3] https://bugzilla.mozilla.org/show_bug.cgi?id=1724755 Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-09-08touch_handler: Fix scroll up behavior on Firefox AndroidGravatar Andrew Gunnerson 1-1/+1
When the touchmove listener is registered with passive: false, scrolling up on Firefox Android only works every other attempt. When scrolling breaks, the touchmove callback is never invoked. The passive flag was originally set to false as part of a fix to prevent vertical scrolling while swiping: 3f3174491103fc5a96b36918d8eada778f5b7210. Setting passive to true doesn't seem to negatively affect that in both Firefox and Chrome, but fixes the scoll up behavior on Firefox. Fixes: #2053 Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
2023-08-10Move internal packages to an internal folderGravatar Frédéric Guillot 1-0/+187
For reference: https://go.dev/doc/go1.4#internalpackages