-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
Summary
When using the <Input> element inside a widget, the onTextEditEnd handler does not fire if the plugin UI is open (via figma.showUI). Additionally, all other widget actions (e.g. onClick) appear blocked or deferred until the UI is closed (after editing the <Input>).
Steps to Reproduce
- Add an
<Input>withonTextEditEndinside a widget. - Add a button that calls
figma.showUI()on click. - Open the UI
- Add text to
<Input>and blur - Observe that:
onTextEditEndnever fires and any widget actions (e.g. button click logs or follow-up actions) are deferred until the UI is closed.
Expected Behavior
onTextEditEndshould fire when focus leaves the<Input>, even if the plugin UI is opened.- Other widget actions should run immediately, not be blocked or queued until the UI closes.
Actual Behavior
onTextEditEndonly fires when the UI is closed.- Widget interactions (like clicks) seem blocked while the UI is open (after input blur) — no console logs, no state updates.
Sample Code
const { widget } = figma;
const { AutoLayout, Input, Text } = widget;
const Widget = () => {
const handleBlur = () => {
console.log('input blur');
}
return (
<AutoLayout>
<Input
value={""}
onTextEditEnd={handleBlur}
placeholder="placeholder..."
/>
<AutoLayout
onClick={async () => {
await new Promise(() => {
figma.showUI("<script></script>", { height: 40, width: 196 });
});
}}>
<Text>Open UI</Text>
</AutoLayout>
</AutoLayout>
);
};
widget.register(Widget);
Metadata
Metadata
Assignees
Labels
No labels