Skip to content

fix: handle x:Name fallback in RegisterHotKeyChange and AddRichPopover#3

Open
Nigh wants to merge 1 commit into
owhs:mainfrom
Nigh:fix/register-name-compat
Open

fix: handle x:Name fallback in RegisterHotKeyChange and AddRichPopover#3
Nigh wants to merge 1 commit into
owhs:mainfrom
Nigh:fix/register-name-compat

Conversation

@Nigh

@Nigh Nigh commented Jun 14, 2026

Copy link
Copy Markdown

RegisterHotKeyChange() directly accessed _Props["Name"] without checking for x:Name, causing a key-not-found error on AXML-defined HotKeyBox elements that only have x:Name set.

_AddRichPopover() only checked _Props["Name"], so AXML-defined elements with x:Name would bypass the existing name and get a duplicated auto-generated name instead.

Both functions now follow the same Name/x:Name fallback pattern already used by Find(), _CollectInlineEvents(), and _AddRichPopoverAdv().

RegisterHotKeyChange() directly accessed _Props["Name"] without
checking for x:Name, causing a key-not-found error on AXML-defined
HotKeyBox elements that only have x:Name set.

_AddRichPopover() only checked _Props["Name"], so AXML-defined
elements with x:Name would bypass the existing name and get a
duplicated auto-generated name instead.

Both functions now follow the same Name/x:Name fallback pattern
already used by Find(), _CollectInlineEvents(), and
_AddRichPopoverAdv().
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.

1 participant