php.net |  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php-bugs-2020 at ryandesign dot com
New email:
PHP Version: OS:

 

 [2020-10-02 16:53 UTC] php-bugs-2020 at ryandesign dot com
Description:
------------
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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:

http://ryandesign.com/tmp/bugs.php.net.screen.shot.2020-10-02.png
 [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:

https://bugs.webkit.org/show_bug.cgi?id=8351

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

https://bugs.webkit.org/show_bug.cgi?id=69014

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] cmb@php.net
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] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2022-01-20 17:21 UTC] cmb@php.net
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: Thu Mar 28 18:01:29 2024 UTC