Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Replace preview #16118

Merged
merged 1 commit into from
Jul 6, 2024
Merged

fix Replace preview #16118

merged 1 commit into from
Jul 6, 2024

Conversation

w-e-w
Copy link
Collaborator

@w-e-w w-e-w commented Jun 30, 2024

Description

  1. when an extra networks tab is selected, the generation tabs is deselected
  2. when a tab is deselected the tab and child elements on the tab such as gallery is not longer displayed
  3. when something is not displayed the .offsetParent property is null

in all_gallery_buttons() we use the when not displayed offsetParent is null behavior to select only the gallery that is currently being displayed

if (elem.parentElement.offsetParent) {

but this no longer works after #11808 as the tab gallery will always be not displayed when we switched to the extra networks tab to replace the preview


fix solution
Implement a different galleries selector base on element ID to directly to select the specific gallery


I create a new function because I don't want to touch the existing selected_gallery_index() in case it breaks something else

Checklist:

fix broken Replace preview for extra networks tabs edit metadata
caused by #11808
@AUTOMATIC1111 AUTOMATIC1111 merged commit 9cbde79 into dev Jul 6, 2024
6 checks passed
@AUTOMATIC1111 AUTOMATIC1111 deleted the fix-Replace-preview branch July 6, 2024 06:44
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.

2 participants