This simple application shows problem in Firefox and Safari browsers when navigating between two pages, where second page is using inline stylesheet. There are two pages
/first/show
/second/show
Second page is using different layout (with different <head />
) that has inline stylesheet, written like this
<style type='text/css' nonce="<%= content_security_policy_nonce %>">
body {
background-color: red
}
</style>
Scenario
- Run
bundle install
- Start server
bundle exec rails s
- Open http://localhost:3000/first/show
- Click link "Go to Second"
Result: Background colour will not change. However, when you reload page it will.
Workaround
If you add data-turbo-track=reload
to custom stylesheet it will work.