Fix legacy (no-wv) Feedback widget close on mobile#7693
Open
coskunaydinoglu wants to merge 1 commit into
Open
Conversation
Legacy NPS and Rating widgets (those without a wv parameter) sent their close signal via postMessage even on mobile, where the SDK only intercepts URL navigation -- so the close button did nothing on Android/iOS. Make the no-wv branch trigger a real navigation to https://countly_action_event?cly_widget_command=1&close=1 on mobile, matching the modern (wv) widgets, while preserving the existing web postMessage behaviour for legacy widgets. https://claude.ai/code/session_015nUig7QXdAEYMhS16eSsu1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: legacy Feedback widget close on mobile (Rating widget)
Problem
Legacy Rating widgets without a
wv(widget version) parameter sent their close signal viapostMessageeven on mobile, and without thecly_widget_commandidentifier ({close: true}only). Mobile SDKs (Android/iOS) only intercept a real URL navigation, notpostMessage, so tapping close on these legacy widgets did nothing on phones.Fix
plugins/star-rating/frontend/public/templates/feedback-popup.html— in the no-wvbranch ofcloseHandler, navigate on mobile like the modern (wv) widgets:(
platform !== 'Web'is used rather than theisWebSDKvar, which is only declared inside thewvbranch — using it here would hit avar-hoistingundefinedand misfire on web.)The web
postMessagepath is unchanged (legacy preservation); only the missing mobile navigation is added.Notes
mastercopy ofstar-rating, which is what the enterprise build consumes via thecoresubmodule; a parallel change is incountly-platform's ownstar-ratingcopy.https://claude.ai/code/session_015nUig7QXdAEYMhS16eSsu1
Generated by Claude Code