|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80177 Bug tracker package affected lists behave wrong in Safari
Submitted: 2020-10-02 16:53 UTC Modified: 2022-01-20 17:21 UTC
From: php-bugs-2020 at ryandesign dot com Assigned: cmb (profile)
Status: Wont fix Package: Website problem
PHP Version: Irrelevant OS: macOS 10.13.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
47 - 5 = ?
Subscribe to this entry?

 [2020-10-02 16:53 UTC] php-bugs-2020 at ryandesign dot com
In this bug tracker, the "Package affected" lists are intended to function as a two-level selector: first you select the category in the leftmost list, then the rightmost list populates with more specific problem types in that category.

This works fine for me in Google Chrome on macOS. When the page loads, no selection is made in the leftmost list and the rightmost list is empty except for the instruction to select a category. Selecting an item in the leftmost list populates the relevant list of choices in the rightmost list.

But it does not work in Apple Safari on macOS. In Safari, it works exactly backward. When the page loads, no selection is made in the leftmost list and EVERY CATEGORY'S SUBITEMS are shown in the rightmost list. Selecting any category in the leftmost list HIDES THAT CATEGORY'S SUBITEMS in the rightmost list. It has been this way forever.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-02 16:56 UTC] php-bugs-2020 at ryandesign dot com
Here is a screenshot showing the difference between what happens in Chrome and what happens in Safari:
 [2020-10-02 22:36 UTC] php-bugs-2020 at ryandesign dot com
I think I understand your package-affected.js script now and how this UI widget works. The rightmost list is the only list in the HTML and it defines an optgroup for each category and options inside them. The JavaScript builds the leftmost list by using the optgroup names. It then applies style="display:none" to the optgroups on the right so that they disappear. When selecting something in the leftmost list, all of the options from the corresponding optgroup in the rightmost list are moved to the top level of the rightmost list and become visible.

The problem seems to just be that Safari does not honor style="display:none" on optgroups. The list manipulation is working, I just have to scroll all the way to the bottom of the rightmost list to see the items from the currently selected category.

Here is a WebKit bug report from 2006 about not supporting style="display:none" on options:

Here's one from 2011 about not supporting style="display:hidden" on optgroups:

Since WebKit seems not to be fixing these, perhaps your JavaScript could use a different strategy. For example, the original full select list could be hidden entirely and two new visible select lists could be created: the leftmost one the same way it is now, and the rightmost one would be created empty except for the "select a category" instructions, and when a category is selected, the instructions element would be deleted and the relevant options from the hidden list would be moved to the visible list.
 [2021-09-19 12:43 UTC] ddpm at liscovius dot de
I can confirm this behavior on Safari 13.1.2

(Voting on bug is not working, I got only white site as response)
 [2021-10-11 16:23 UTC]
A simpler fix could be to use feature detection, and not to
execute the JS for unsupporting clients at all.
 [2022-01-20 17:21 UTC]
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2022-01-20 17:21 UTC]
Given that bugsnet has been superseded by GH issues, it is
sufficiently safe to assume that this issue won't be fixed.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 28 01:01:31 2024 UTC