Media Viewer: Fix scrolling caption (#1916)
This commit is contained in:
parent
cf2fdc7219
commit
53e87868fa
@ -321,6 +321,12 @@ export function captureEvents(element: HTMLElement, options: CaptureOptions) {
|
|||||||
|
|
||||||
function onWheel(e: WheelEvent) {
|
function onWheel(e: WheelEvent) {
|
||||||
if (!options.onZoom && !options.onDrag) return;
|
if (!options.onZoom && !options.onDrag) return;
|
||||||
|
if (options.excludedClosestSelector && (
|
||||||
|
(e.target as HTMLElement).matches(options.excludedClosestSelector)
|
||||||
|
|| (e.target as HTMLElement).closest(options.excludedClosestSelector)
|
||||||
|
)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (!hasMoved) {
|
if (!hasMoved) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user