Open Bug 1411054 Opened 7 years ago Updated 2 years ago

event.preventDefault() not working properly with wheel events in <img> <map> <area> elements, making the page scroll, no matter what.

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

56 Branch
defect

Tracking

()

People

(Reporter: dejothe74, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

Attached file Bug example.html
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20171002220106

Steps to reproduce:

1 - create rudimentary html structure. Basics.. and add IMG, element that uses image area map.
2 - add event listener to that area map (either img, map or area element. Doesn't matter)
3 - scroll


Actual results:

The page scrolls when it shouldn't.


Expected results:

The image must stay still, because I am making a magnifying glass hovering over the image, following the mouse pointer, and using the scrollwheel for zooming in-and-out. The image MUST stay still for that, and the only workaround I can think of is wrapping the image in div and preventing the scrolling there, but by capturing it there, but it is an ugly fix that actually limits the final design (can't scroll the page outside the image map area, where it actually should scroll).
Summary: event.preventDefault() not working properly with wheel events (added through javascript) in <img> -> <map> -> <area> elements, making the page scroll, no matter what. → event.preventDefault() not working properly with wheel events (added through javascript) in <img> <map> <area> elements, making the page scroll, no matter what.
Summary: event.preventDefault() not working properly with wheel events (added through javascript) in <img> <map> <area> elements, making the page scroll, no matter what. → event.preventDefault() not working properly with wheel events in <img> <map> <area> elements, making the page scroll, no matter what.
Component: Untriaged → Event Handling
Product: Firefox → Core
If I disable APZ (flip the preference layers.async-pan-zoom.enabled), I get the expected result.
Status: UNCONFIRMED → NEW
Depends on: 1151654
Ever confirmed: true
Priority: -- → P3
Component: Event Handling → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: