Don't track theme style tags with turbolinks
This commit is contained in:
parent
12955cc663
commit
3a4b04b5da
|
@ -103,6 +103,7 @@ if window.URL? or window.webkitURL?
|
|||
# theming
|
||||
|
||||
previewStyle = document.createElement 'style'
|
||||
previewStyle.setAttribute('data-turbolinks-track', 'false')
|
||||
document.head.appendChild previewStyle
|
||||
|
||||
previewTimeout = null
|
||||
|
@ -171,7 +172,6 @@ generateTheme = (payload) ->
|
|||
console.log plKey
|
||||
if theme_attribute_map[plKey]
|
||||
if theme_attribute_map[plKey].includes 'text'
|
||||
console.log "aaa"
|
||||
hex = getHexColorFromThemeValue(payload[plKey])
|
||||
body += "--#{theme_attribute_map[plKey]}: #{getDecimalTripletsFromHex(hex)};\n"
|
||||
else
|
||||
|
|
|
@ -43,7 +43,7 @@ module ThemeHelper
|
|||
|
||||
body += "}"
|
||||
|
||||
content_tag(:style, body)
|
||||
content_tag(:style, body, data: { "turbolinks-track": false })
|
||||
end
|
||||
|
||||
def get_active_theme
|
||||
|
|
|
@ -18,7 +18,7 @@ describe ThemeHelper, :type => :helper do
|
|||
end
|
||||
|
||||
it "returns a theme" do
|
||||
expect(helper.render_theme).to include("<style>:root {")
|
||||
expect(helper.render_theme).to include('<style data-turbolinks-track="false">:root {')
|
||||
end
|
||||
|
||||
it "contains correct theme background colors" do
|
||||
|
|
Loading…
Reference in New Issue