Skip to content

Comments

Fix premature flyout of nested submenu on hover#91

Merged
thehack904 merged 6 commits intodevfrom
copilot/improve-auto-scroll-menu
Feb 16, 2026
Merged

Fix premature flyout of nested submenu on hover#91
thehack904 merged 6 commits intodevfrom
copilot/improve-auto-scroll-menu

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

Nested "Scroll Speed" submenu was displaying when hovering over parent "Auto-Scroll" item instead of only when hovering directly over "Scroll Speed" link.

Changes

CSS selector specificity fix (static/css/base.css:115)

Changed descendant selector to direct child selector:

/* Before: matches all descendant .submenu-content */
.submenu:hover .submenu-content { display: block; }

/* After: matches only direct child .submenu-content */
.submenu:hover > .submenu-content { display: block; }

Behavior

Hover over "Auto-Scroll" - shows first-level menu only:

First level

Hover over "Scroll Speed" - shows second-level menu:

Second level

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • iptv.lan
    • Triggering command: /usr/bin/python python app.py (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Issue #2: Guide UX Improvements - Auto-Scroll Menu Enhancement

Objective

Restructure the Auto-Scroll menu to use a flyout submenu pattern (like "Change Tuner") instead of a simple toggle button.

Requirements

Menu Structure Changes

  1. Desktop Menu (templates/_header.html line 31):

    • Change "Toggle Auto-Scroll" to "Auto-Scroll" with flyout submenu
    • Add "Enable/Disable Auto-Scroll" as first submenu item
    • Add "Scroll Speed" submenu with nested flyout containing:
      • Slow
      • Medium
      • Fast
  2. Mobile Menu (templates/_header.html line 112):

    • Apply same structure as desktop menu
    • Use existing mobile-submenu and mobile-submenu-toggle patterns
    • Ensure proper nesting for triple-level menus

JavaScript Updates

  1. templates/guide.html:

    • Add event handlers for scroll speed selection (data-scroll-speed attribute)
    • Save speed preference to localStorage as autoScrollSpeed
    • Apply speed on page load if saved
    • Speed mappings:
      • slow: 0.6 px/frame
      • medium: 1.2 px/frame (default)
      • fast: 2.4 px/frame
    • Call window.__autoScroll.setSpeed(value) to apply changes
  2. static/js/auto-scroll.js:

    • Change scrollSpeed from const to let (currently line 14)
    • Add setSpeed(speed) method to window.__autoScroll API (after line 439)
    • Add getSpeed() method to return current speed
    • Validate speed is a positive number before applying

CSS (if needed)

  1. static/css/base.css:
    • Verify triple-nested submenu support (submenu within submenu)
    • Add CSS for third-level .submenu-content positioning if not already present
    • Ensure z-index stacking works correctly

Expected Behavior

  • User hovers over "Auto-Scroll" → submenu appears
  • User hovers over "Scroll Speed" → speed options appear to the right
  • Clicking a speed option saves to localStorage and applies immediately
  • Speed persists across page reloads
  • Mobile menu uses button toggles instead of hover

Files to Modify

  1. templates/_header.html
  2. templates/guide.html
  3. static/js/auto-scroll.js
  4. static/css/base.css (if triple-nesting CSS needed)

Notes

  • Follow the existing pattern used by "Change Tuner" submenu (lines 15-26 in _header.html)
  • Maintain accessibility attributes (role, aria-*)
  • Keep the id="toggleAutoScroll" on the Enable/Disable link for backward compatibility with existing guide.html script
  • For mobile, use id="mobileToggleAutoScroll" on the Enable/Disable link

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Feb 16, 2026
Copilot AI and others added 4 commits February 16, 2026 19:56
Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com>
Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com>
Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com>
Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Auto-Scroll menu to use flyout submenu pattern Refactor Auto-Scroll menu to flyout submenu with speed controls Feb 16, 2026
Copilot AI requested a review from thehack904 February 16, 2026 20:04
Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com>
Copilot AI changed the title Refactor Auto-Scroll menu to flyout submenu with speed controls Fix premature flyout of nested submenu on hover Feb 16, 2026
@thehack904 thehack904 marked this pull request as ready for review February 16, 2026 20:17
@thehack904 thehack904 merged commit 07646a2 into dev Feb 16, 2026
@thehack904 thehack904 deleted the copilot/improve-auto-scroll-menu branch February 16, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants