Skip to content

Fix "Select From Inputs" modal on the Simple tab - #1600

Closed
rvalitov wants to merge 1 commit into
mcmonkeyprojects:masterfrom
rvalitov:fix/simple-tab-input-modal
Closed

rvalitov wants to merge 1 commit into
mcmonkeyprojects:masterfrom
rvalitov:fix/simple-tab-input-modal

Conversation

@rvalitov

Copy link
Copy Markdown

Fixes #1599.

Summary

The "Select From Inputs" modal is emitted by GenTabModals.cshtml, which is included inside GenerateTab.cshtml's tab pane. When the Simple tab is active that pane has display:none, so Bootstrap inserts the modal backdrop but the modal itself never becomes visible, leaving the page blocked.

The same button works on the Generate tab, where the parent pane is visible.

Change

Detach the modal to <body> before showing it:

$('#input_image_browser_modal').appendTo('body');
$('#input_image_browser_modal').modal('show');

This is a one-line change in src/wwwroot/js/site.js; the modal is then no longer constrained by whichever tab pane happens to be active.

Testing

  • Hard-refreshed the UI, opened the Simple tab, selected a stored workflow exposing an image parameter, and clicked Select — the "Select From Inputs" modal opens normally.
  • The Generate tab's Select button still works (appendTo('body') is a no-op there once the modal is at body level).

The "Select From Inputs" modal is emitted by GenTabModals.cshtml, which is included inside the Generate tab pane. When the Simple tab is active that pane is display:none, so Bootstrap shows the modal backdrop but the modal itself never becomes visible, blocking the page. Detach the modal to <body> before showing it so it is not constrained by the active tab pane.
@rvalitov

Copy link
Copy Markdown
Author

May I know what's wrong with this PR so I can improve it?

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.

Simple tab: "Select" image button leaves a grey backdrop, modal never opens

2 participants