Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Page Editor does not always update when clicking the browser’s back button #4257

Closed
fregante opened this issue Sep 9, 2022 · 6 comments
Labels
bug Something isn't working page editor Stale

Comments

@fregante
Copy link
Contributor

fregante commented Sep 9, 2022

Repro

  1. Visit website A with host permissions
  2. Open page editor
    • ✅ See "No extension selected" screen
  3. Visit website B (regardless of permissions)
    • ✅ Editor updates correctly
  4. Click the browser’s Back button
    • ❌ Editor still shows the old bricks
  5. Refresh the page (not the editor)
    • ✅ Editor updates correctly

Sub-repro

Do the same, but between websites that have no host permissions and step 6/7 works correctly

Demo

See how the editor shows "Enable on nytimes" even after going back to pbx

Untitled.mov

Solution

Ensure that whatever event we're using to listen to the URL change also responds correctly to history navigation events.

@fregante
Copy link
Contributor Author

Similar: it seems that hasTabPermission isn't updated sometimes:

Screen.Recording.2.mov

You can verify this by adding console.log({tabHasPermissions, isConnectingToContentScript}) in EditorContent.tsx

@fregante
Copy link
Contributor Author

fregante commented Jan 5, 2024

This is still an issue, even disregarding the host permission.

The information in the sidebar is actually wrong even after the page reload.

Here all the extensions are available on PBX, but after the navigation and reload they're still marked as unavailable:

Screen.Recording.mov

Copy link

github-actions bot commented Apr 5, 2024

This issue will be closed in 7 days unless the stale label is removed, or a comment is added to the issue.

@github-actions github-actions bot added the Stale label Apr 5, 2024
@fregante
Copy link
Contributor Author

fregante commented Apr 7, 2024

Issue still seen:

  1. Open page editor
  2. Add mod on https://pbx.vercel.app/
  3. Visit https://google.com
    • crossed eye appears ✅
  4. Go back
    • crossed eye does not disappear ❌

This is probably a small issue. #8074 would have fixed it but that was the wrong "event" to listen to.

@fregante fregante removed the Stale label Apr 7, 2024
Copy link

github-actions bot commented Jul 7, 2024

This issue will be closed in 7 days unless the stale label is removed, or a comment is added to the issue.

@github-actions github-actions bot added the Stale label Jul 7, 2024
Copy link

This issue was closed because it has been stale for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working page editor Stale
Development

No branches or pull requests

1 participant