adhocracy4 icon indicating copy to clipboard operation
adhocracy4 copied to clipboard

Embed: navigation triggered from JavaScript in rating code

Open xi opened this issue 7 years ago • 0 comments

One of the restrictions for embedding is "Do not trigger navigation from JavaScript". This is broken in the rating code:

https://github.com/liqd/adhocracy4/blob/9fcedc1153fb0542d189adcc874f5552425a0afb/adhocracy4/ratings/static/ratings/react_ratings.jsx#L59

This results in the following issue:

  • Go to a project where a normal user can rate
  • Log out
  • Try to rate

The expected outcome would be to get a login popup. Instead the iframe gets redirected to /accounts/login/ on the embedding domain.

xi avatar Nov 06 '17 14:11 xi