Opened on 11/21/2018 at 11:18:05 AM

Closed on 11/23/2018 at 01:18:09 PM

Last modified on 05/20/2019 at 10:58:16 AM

#7134 closed defect (fixed)

Firefox `event.layerX` coordinates off by `element.offsetLeft`

Reported by: agiammarchi Assignee: agiammarchi
Priority: P1 Milestone:
Module: User-Interface Keywords:
Cc: Blocked By:
Blocking: #6936 Platform: Firefox
Ready: yes Confidential: no
Tester: Unknown Verified working: yes
Review URL(s):

https://gitlab.com/eyeo/adblockplus/abpui/adblockplusui/merge_requests/163

Description (last modified by greiner)

Firefox has a consistent issue with the event.layerX/Y when the element is positioned through flexbox, considering the container the layer, and not the element itself.

This means that Issue Reporter X coordinates are off by the width of the previous element, because the layerX is considered from the canvas parent, instead of the canvas itself.

This is unfortunately not a feature detection friendly issue, so we need to force-fix layerX per each Firefox.

Being layerX/Y somehow legacy, it is safe to assume future versions of Firefox will preserve the behavior, yet we need to be sure when some part of the issue reporter screenshot is highlighted, all supported browsers draw rectangles where appropriate.

The non-layer based fallback works already, but it requires more computational power, so until layerX/Y are available, I still suggest we use these instead of manual coordinates transformation.

See also ui#251.

Attachments (0)

Change History (4)

comment:1 Changed on 11/21/2018 at 11:28:28 AM by agiammarchi

  • Review URL(s) modified (diff)

comment:2 Changed on 11/23/2018 at 01:17:48 PM by greiner

  • Blocking 6936 added
  • Description modified (diff)
  • Owner set to agiammarchi
  • Priority changed from Unknown to P1

comment:3 Changed on 11/23/2018 at 01:18:09 PM by greiner

  • Resolution set to fixed
  • Status changed from new to closed

comment:4 Changed on 05/20/2019 at 10:58:16 AM by abpbot

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from agiammarchi.
 
Note: See TracTickets for help on using tickets.