Skip to content

Comments

fix Replace preview#16118

Merged
AUTOMATIC1111 merged 1 commit intodevfrom
fix-Replace-preview
Jul 6, 2024
Merged

fix Replace preview#16118
AUTOMATIC1111 merged 1 commit intodevfrom
fix-Replace-preview

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
@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