Page MenuHomePhabricator

Ensure popupContainer is a valid node before trying to add a popup to it
Closed, ResolvedPublicBUG REPORT

Description

First reported here: https://github.com/wikimedia/wikipedia-preview/issues/182

Although that report is light in details, I experienced this issue during recent development.

If the popupContainer init parameter is provided but invalid, the code fails with a low-level error.

We should validate it and fallback to the default value instead of erroring out.

QA Results - Diff Local

ACStatusDetails
1T361703#9861934

Event Timeline

@SBisson With an invalid init parameter in popupContainer, it falls back to the default and does not error out as seen in the video below. I will move this to design sign-off. Thanks for all your work!

Status: ✅PASS
Environment:Diff Local
OS: macOS Sonoma 14.5
Browser: Chrome 125
Skins.n/a
Device: MBA M2
Emulated Device:: n/a
Test Links:
http://localhost:5173/demo/index.html

✅AC1: popupContainer- fallback to the default value instead of erroring out