Add modal like support for panels preventing new selections

In one of my panels I open a second view that has more details. If the user selects another item in the artboard the panel loses sync with the selected item(s).

If there was a way for a panel to enter a locked state so that the user could not select anything else on the artboard that would prevent some issues. I can code around it and check that no new selections occur while in this “edit” mode in the panel.

This is sort of like a modal dialog but for panels.

Use Case
Fredrick is writing a panel that adds rich text formatting to text fields. When the user selects a text field the panel shows a rich text editor controls. The user then starts typing in the editor in the panel. But if he selects another element on the stage the text may not save and may have errors from background processes and edit context.

Fredrick wants to prevent the user from selecting anything on the stage while the user is typing in his panel. The user can click his Cancel or OK buttons (or press the ESC key) to exit out of this locked state.

Hi @Velara, this goes against the panel’s original purpose, which is to allow users to interact with the panel UI while the document is open and not locked. For your use case, please consider using a modal.

1 Like

Also, for a kind of WYSIWYG editor in the panel, it could be useful to update the XD element “live” (I’m currently using this in my soon to be released Markdown plugin)…