Conversation
openFeedback() reaches into the feedback widget's iframe and clicks the
button inside it, with no guard at any step:
const launcherFrame = document.getElementById("launcher-frame");
const button = (launcherFrame as HTMLIFrameElement).contentWindow.document
.getElementsByClassName("launcher-button")[0];
(button as HTMLButtonElement).click();
If the widget hasn't loaded — blocked, slow, or prevented by a browser's
tracking protection, which is the usual story on iOS — then launcherFrame
is null and this throws a TypeError. The Feedback menu item does nothing at
all, and the only trace is a console error the user never sees. Reading the
iframe's document can also throw outright.
Each step is now optional-chained inside a try, and when the widget cannot
be reached the click falls back to a mailto: to elections@equal.vote rather
than silently failing.
I could not reproduce Equal-Vote#1080 on an iPhone — no device — so this is a fix for
the failure mode the code makes possible, not a confirmed reproduction of
the one in the video. If the widget IS loading on that phone and the button
is being clicked, the cause is elsewhere and this only removes a way for it
to fail quietly.
|
Warning Review limit reached
Next review available in: 59 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Deploy Preview for bettervoting ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Description
Refs #1080.
openFeedback()reaches into the feedback widget's iframe and clicks the button inside it, with no guard at any step:If the widget has not loaded — blocked, slow, or stopped by a browser's tracking protection, which is the usual story on iOS —
launcherFrameisnulland this throws. The Feedback menu item then does nothing at all, and the only trace is a console error no user will see. Reading the iframe's document can throw outright too.Each step is now optional-chained inside a
try, and when the widget cannot be reached the click falls back to amailto:rather than failing silently.What this is and isn't
I could not reproduce the iPhone case — no device. This fixes the failure mode the code makes possible, which matches the symptom in the video (tapping Feedback does nothing). If the widget is loading on that phone and the button is being clicked, the cause is elsewhere and this change only removes a way for it to fail quietly.
Worth a second opinion on the fallback address: I used
elections@equal.vote, which is the contact address already used elsewhere inen.yaml. If there is a better destination for feedback specifically, say the word.Related Issues
Refs #1080