Skip to content

#1994 Anchor the Tab spell-list menu to the live editbox, not a stale editor frame - #1995

Merged
TimothyLuke merged 1 commit into
TimothyLuke:masterfrom
LarryThiessen:fix-1994-tab-menu-stale-owner
Aug 21, 2026
Merged

#1994 Anchor the Tab spell-list menu to the live editbox, not a stale editor frame#1995
TimothyLuke merged 1 commit into
TimothyLuke:masterfrom
LarryThiessen:fix-1994-tab-menu-stale-owner

Conversation

@LarryThiessen

Copy link
Copy Markdown
Contributor

Fixes #1994 (follow-up to #1989)

Problem

The Tab spell list worked after a /reload, then silently stopped once the editor had been re-created (e.g. across a combat transition). Debug at failure: owner shown= false, editors= 1, ownerIsNewest= false — the handler fires, but its menu owner is a hidden frame, and Blizzard won't open a context menu on a hidden region.

Root cause: GSE.CreateSpellEditBox is defined once (if GSE.isEmpty(...)) inside the first editor created, so editframe inside it is a permanent upvalue to that first editor. The #1989 wiring passed editframe.frame as the menu owner instead of the factory's frame parameter — my mistake in that PR.

Fix (2 files, +12/−7)

  • Editor.lua — pass the factory's frame parameter (the current editor's frame) to OnEditorSpellTab / OnEditorMacroBlockTab.
  • QoL.lua — anchor all four Tab menus to the editbox itself (visible by definition when Tab fires), the same approach the icon Select menu takes with its panel-local frame. Belt and braces.

Heads-up (not changed here): the same factory passes the stale editframe upvalue to UpdateMacroLimitState(..., editframe, version) — the 255-char Save state may be updating the dead editor after a re-create.

Verified

In-game: the menu now appears every time, including after combat transitions. luac -p clean.

🤖 Generated with Claude Code

…not a stale editor frame

After a /reload the TimothyLuke#1989 Tab spell list worked, then silently stopped
appearing once the editor had been re-created (e.g. across a combat
transition). The handler still fired; the menu never opened. The owner
it anchored to reported hidden: GSE.CreateSpellEditBox is defined once,
guarded by GSE.isEmpty, inside the first editor ever created, so the
`editframe` inside it is a permanent upvalue to that first editor. The
TimothyLuke#1989 wiring passed editframe.frame as the menu owner instead of the
factory's `frame` parameter (the current editor's frame), and Blizzard
will not open a context menu on a hidden owner.

- Editor.lua: pass the factory's `frame` parameter to the Tab hooks.
- QoL.lua: anchor all four Tab menus to the editbox itself -- visible by
  definition when Tab fires -- the same approach the icon Select menu
  already takes with its panel-local frame.

Fixes TimothyLuke#1994

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@TimothyLuke
TimothyLuke merged commit f4c93ec into TimothyLuke:master Aug 21, 2026
1 check passed
@LarryThiessen
LarryThiessen deleted the fix-1994-tab-menu-stale-owner branch August 22, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants