Skip to content

fix: iframe text input (IME) - #28

Merged
StarkMP merged 2 commits into
PrismaUI-SKSE:devfrom
Dekana:bugfix/iframe-text-input
May 10, 2026
Merged

fix: iframe text input (IME)#28
StarkMP merged 2 commits into
PrismaUI-SKSE:devfrom
Dekana:bugfix/iframe-text-input

Conversation

@Dekana

@Dekana Dekana commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Removes the input element filtering for IME state changes that was added in #25 .

Problem

In order to hide the system IME window when text elements are focused / unfocused, I had added javascript tracking for inputs and textarea focus events. However, that didn't work with iframes, which at least some Prisma UI mods are dependent on, resulting in text input not working (being filtered out) within iframes.

Changes

Removed the per-element focus tracking from the IME support. This reverts the behavior to be much closer to the 1.3 state, plus the json IME state event for custom UI mods to use.

This is a slight loss of behavior for IME input, as described in the following scenario, but not a big change.
Scenario: User unfocuses a text input (clicks a panel), then types, then refocuses the text input.
Before: IME state is reset automatically - no composition is shown in the text input (track when input was focused, clear state)
After: IME state is not reset. On re-focusing the text input, the IME state event shows the text that was typed while nothing was in focus.

This could be mitigated by providing an API to clear IME state, with the consumer mod calling it on-demand when their text elements gain/lose focus. But it seems pretty minor, not sure this is needed for now.

Testing done

  • SkyrimNet: with its chat input, can type in Japanese and see that mod's custom IME overlay. System IME does not appear when typing while text elements are unfocused.
  • SkyrimNet Prisma Dashboard plugin: This mod shows a webpage inside an iframe. Text input works inside this page (broken before this PR).
  • Tailor: Still no freezes when using the mod, switching focus between elements.

@StarkMP StarkMP added the bug Something isn't working label Apr 19, 2026
@StarkMP StarkMP changed the title Bugfix/iframe text input fix: iframe text input (IME) Apr 20, 2026
@StarkMP
StarkMP merged commit e09977a into PrismaUI-SKSE:dev May 10, 2026
@Dekana
Dekana deleted the bugfix/iframe-text-input branch May 10, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants