elementary / website

The elementary.io website
https://elementary.io
MIT License
1.24k stars 707 forks source link

Language selection popover doesn't show on Firefox (but does on Epiphany) #2307

Open 3Nex opened 4 years ago

3Nex commented 4 years ago

Prerequisites

Describe the bug

On a page that offers the content in different languages, such as the Code Of Conduct page for example (https://elementary.io/code-of-conduct), there is a language selection link in the footer. But clicking it does not show the selection popover in Firefox. In Epiphany, it does show it.

I can see the popover element is present in the document (div.popover-content), but its opacity property is 0, and its visibility property is hidden after clicking the link. (even though the left property gets updated on click).

To Reproduce

Steps to reproduce the behavior:

  1. Using Mozilla Firefox
  2. Go to https://elementary.io/code-of-conduct
  3. Scroll to bottom
  4. Click "Language" (assuming page is in English)

Expected behavior

The popover with language selection to show up.

Screenshots or screen recordings

Epiphany screenshot, with expected result: https://i.imgur.com/4dETQHC.png

Platform Information

sebastianlay commented 4 years ago

I tracked down the issue to the following line: https://github.com/elementary/website/blob/fbd1aa6b967ad223984a8ffaf1fbfa3a2f9658ba/_scripts/popover.js#L22 Setting the overflow here triggers a scroll event in Firefox which triggers https://github.com/elementary/website/blob/fbd1aa6b967ad223984a8ffaf1fbfa3a2f9658ba/_scripts/popover.js#L33 and causes the popover to be immediately hidden again.

Commenting out the first line eliminates the issue but I am not sure why it is there in the first place.

okitoxo commented 3 years ago

This issue is no longer on Firefox 85.0.1 (64-bit)