Comments (3)
Iโm having this issue as well. It took me a bit to track down the source of the issue so finding this was helpful. However, I see itโs been a few months and no acknowledgement. Iโm not sure if this repo is monitored, maybe it needs to be posted to turbo core repo?
from turbo-rails.
Are either of you able to share a script or code sample that reproduces this issue?
Save the following to a local file, make changes to demonstrate your use case, execute it with ruby bug.rb
, then share the contents:
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
gem "rails"
gem "propshaft"
gem "puma"
gem "sqlite3", "~> 1.4"
gem "turbo-rails"
gem "capybara"
gem "cuprite", require: "capybara/cuprite"
end
ENV["DATABASE_URL"] = "sqlite3::memory:"
ENV["RAILS_ENV"] = "test"
require "active_record/railtie"
# require "active_storage/engine"
require "action_controller/railtie"
require "action_view/railtie"
# require "action_mailer/railtie"
# require "active_job/railtie"
require "action_cable/engine"
# require "action_mailbox/engine"
# require "action_text/engine"
require "rails/test_unit/railtie"
class App < Rails::Application
config.load_defaults Rails::VERSION::STRING.to_f
config.root = __dir__
config.hosts << "example.org"
config.eager_load = false
config.session_store :cookie_store, key: "cookie_store_key"
config.secret_key_base = "secret_key_base"
config.consider_all_requests_local = true
config.action_cable.cable = {"adapter" => "async"}
config.turbo.draw_routes = false
Rails.logger = config.logger = Logger.new($stdout)
routes.append do
root to: "application#index"
end
end
Rails.application.initialize!
ActiveRecord::Schema.define do
create_table :messages, force: true do |t|
t.text :body, null: false
end
end
class Message < ActiveRecord::Base
end
class ApplicationController < ActionController::Base
include Rails.application.routes.url_helpers
class_attribute :template, default: DATA.read
def index
render inline: template, formats: :html
end
end
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
driven_by :cuprite, using: :chrome, screen_size: [1400, 1400], options: {js_errors: true}
end
Capybara.configure do |config|
config.server = :puma, {Silent: true}
config.default_normalize_ws = true
end
require "rails/test_help"
class TurboSystemTest < ApplicationSystemTestCase
test "reproduces bug" do
visit root_path
assert_text "Loaded with Turbo"
end
end
__END__
<!DOCTYPE html>
<html>
<head>
<%= csrf_meta_tags %>
<script type="importmap">
{
"imports": {
"@hotwired/turbo-rails": "<%= asset_path("turbo.js") %>"
}
}
</script>
<script type="module">
import "@hotwired/turbo-rails"
addEventListener("turbo:load", () => document.body.innerHTML = "Loaded with Turbo")
</script>
</head>
<body>Loaded without Turbo</body>
</html>
from turbo-rails.
@seanpdoyle The situation in which this is occurring is pretty deep within my app. I'll try and find some time in the next couple weeks to create a simpler repro of it. For now I fixed it with a front-end hack replacing '' with '
from turbo-rails.
Related Issues (20)
- Add morph to StreamActions HOT 5
- how do I batch multiple turbo stream broadcasts?
- <turbo-cable-stream-source> tag can affect visual layout HOT 1
- broadcast_update_to partial should be smarter and extract the inner_html, it feels like a bug
- Turbo not loading on Safari in production HOT 1
- Any Security Constraints to turbo_method: 'post' functionality?
- using the view transitions API? HOT 1
- Unable to render layouts when using inline turbo stream responses HOT 1
- 8.0.5: cdn (and thus importmap pins) has broken import paths "CbGBsmqA.js" instead of cable.js HOT 6
- Turbo Frame + Nginx Cache + data-action-advance
- Need an option for turbo_reset_scroll_tag that goes to bottom for long lists / continuous scrolling
- data-turbo-confirm ignored when data-turbo="false"? HOT 3
- Internationalization (I18n) not working HOT 2
- aria-busy state cleared to early from turbo frame, leads to accessibility issues. HOT 1
- Putting anything inside a <noscript> tag causes Turbo to duplicate all <script> tags into the <body> HOT 2
- Turbo frame request is removing the csrf meta tag
- Adding X-Turbo-Request-Id to custom fetch requests HOT 2
- Release for the routes warning HOT 1
- `turbo_stream` helper requires `capture`
- Issues with broadcast_to and single table inheritance
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from turbo-rails.