Skip to content

fix: prevent dialog/fullsize-dialog plugins from closing immediately after page load#821

Open
usman-khalid wants to merge 1 commit intoadobe:mainfrom
usman-khalid:library
Open

fix: prevent dialog/fullsize-dialog plugins from closing immediately after page load#821
usman-khalid wants to merge 1 commit intoadobe:mainfrom
usman-khalid:library

Conversation

@usman-khalid
Copy link
Contributor

Description

Opening a dialog or fullsize-dialog plugin within the first ~2-3 seconds of page load causes it to appear briefly then close on its own.

handleLibSwitch used standalone render() into the shadow root, which conflicted with LitElement's own rendering. Async re-renders (e.g. from checkPreviewStatus) overwrote the dialog, closing it. Fixed by rendering the dialog through LitElement's reactive cycle instead.

How Has This Been Tested?

Tested on localhost, https://library--da-live--usman-khalid.aem.page/ and with browser override on da.live

Screenshots (if appropriate):

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@aem-code-sync
Copy link

aem-code-sync bot commented Mar 3, 2026

Page Scores Audits Google
📱 / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@auniverseaway
Copy link
Member

I've got a more substantial fix for this already in the works. I'll send a PR this morning for you to look at.

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