Wayland <input type="date"> bug

Steps to reproduce

  1. Use a Firefox running under Wayland in full screen (right edge of the Firefox window should be very close to the right edge of your monitor)
  2. Click on the calendar icon on the right side of each date input in the testcase below
Expected results:
Both inputs should display a calendar widget when calendar icon is clicked
Actual results:
The calendar widget for the second input is not displayed

It seems the widget isn't properly positioned away from the edge of the window and that causes it to never be displayed.

Testcase