question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multi-level nested options not selectable in Chrome

See original GitHub issue

It appears that a newer version of Chrome (I’m running version 46.0.2490.80 (64-bit)) has broken the ability to nest deeper than one level of optgroups. I do not see this issue in Safari 9.0 (10601.1.56.2) or Firefox 41.0.2. I’m also running OS X 10.10.5.

Here is an example JS Fiddle illustrating the issue. In Chrome, I can select the children successfully but am unable to select any grandchildren or deeper. In the linked JS Fiddle example, I am unable to select Option 8 or 10.

I have partially solved this issue by changing a line in ArrayAdapter.prototype.convertToOptions from Utils.appendMany($option, $children); to $options.push($children);. This basically prevents the underlying select from nesting it’s own optgroups, but it appends any nested options to the bottom of the rendered list on select. Still trying to work through that.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
maleficecommented, May 12, 2017

@yahyaerturan, the fork works, though I really hope the fix will be merged into the main repo.

0reactions
alexweissmancommented, Dec 14, 2017

This is now documented: https://select2.org/options#hierarchical-options

Only a single level of nesting is allowed per the HTML specification. If you nest an <optgroup> within another <optgroup>, Select2 will not be able to detect the extra level of nesting and errors may be triggered as a result.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nesting optgroups in a dropdownlist/select - Stack Overflow
The HTML spec here is really broken. It should allow nested optgroups and recommend user agents render them as nested menus. Instead, only...
Read more >
How to create a multilevel dropdown menu in React
Multilevel menus are designed to reveal the deeply nested navigations when we click or hover over the submenu items, as shown in the...
Read more >
Group and arrange tabs in Chrome browser - Google Support
Open Chrome browser. · Click New tab "" . · Choose an option: To add a tab to an existing group, drag the...
Read more >
Untitled
I had a nested repeater within a group within an options page, haha. ... ACF Repeater Render Multi Level Nested (2 levels) https://pafe....
Read more >
Nested Prefabs - Unity - Manual
of the Prefab that is open in Prefab Mode is not shown with the blue cube Prefab icon, however any instances of other...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found