Opened 21 months ago

Closed 21 months ago

Last modified 15 months ago

#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):

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.

Change History (4)

comment:1 Changed 21 months ago by agiammarchi

  • Review URL(s) modified (diff)

comment:2 Changed 21 months ago by greiner

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

comment:3 Changed 21 months ago by greiner

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.