diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 733e5997e..dbade0b82 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -10,6 +10,10 @@ nav_order: 6
## main
+* Revert `Fix yielded content rendered at wrong location when using form helpers.`
+
+ *Joel Hawksley*
+
## 4.11.0
* Update `render_in` signature to accept `**_` for compatibility with Rails [#50623](https://github.com/rails/rails/pull/50623).
diff --git a/lib/view_component/base.rb b/lib/view_component/base.rb
index e8a349d3e..28bf03b5d 100644
--- a/lib/view_component/base.rb
+++ b/lib/view_component/base.rb
@@ -279,22 +279,6 @@ def render(options = {}, args = {}, &block)
end
end
- # Sync @output_buffer with the view context's current output buffer before
- # capturing. Form helpers create builders with @template_object pointing to
- # the component. When those builders later call capture inside a partial
- # (whose _run allocated a fresh OutputBuffer on the view context), the
- # component's stale @output_buffer would capture from the wrong buffer.
- # Temporarily switching to the view context's buffer keeps both in sync.
- #
- # @private
- def capture(...)
- old_output_buffer = @output_buffer
- @output_buffer = view_context.output_buffer if view_context
- super
- ensure
- @output_buffer = old_output_buffer
- end
-
# The current controller. Use sparingly as doing so introduces coupling
# that inhibits encapsulation & reuse, often making testing difficult.
#
diff --git a/test/sandbox/app/components/collection_counter_component.html.erb b/test/sandbox/app/components/collection_counter_component.html.erb
index 51ccec1ad..cc543236d 100644
--- a/test/sandbox/app/components/collection_counter_component.html.erb
+++ b/test/sandbox/app/components/collection_counter_component.html.erb
@@ -3,4 +3,4 @@
Photo.<%= @counter %> - <%= @item.caption %>
-
+
diff --git a/test/sandbox/app/components/collection_iteration_component.html.erb b/test/sandbox/app/components/collection_iteration_component.html.erb
index 3a4b74ea4..440cea0ef 100644
--- a/test/sandbox/app/components/collection_iteration_component.html.erb
+++ b/test/sandbox/app/components/collection_iteration_component.html.erb
@@ -3,4 +3,4 @@
Photo.<%= @counter %> - <%= @item.caption %>
-
+
diff --git a/test/sandbox/app/components/collection_iteration_extend_override_component.html.erb b/test/sandbox/app/components/collection_iteration_extend_override_component.html.erb
index 2729a8d08..52c176cba 100644
--- a/test/sandbox/app/components/collection_iteration_extend_override_component.html.erb
+++ b/test/sandbox/app/components/collection_iteration_extend_override_component.html.erb
@@ -3,4 +3,4 @@
Photo.<%= @counter %> - <%= @override.caption %>
-
+
diff --git a/test/sandbox/app/components/partial_with_yield_form_component.html.erb b/test/sandbox/app/components/partial_with_yield_form_component.html.erb
deleted file mode 100644
index 37359983c..000000000
--- a/test/sandbox/app/components/partial_with_yield_form_component.html.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= form_with url: "/" do |form| %>
- <%= render "shared/yielding_form_partial", form: do %>
- world
- <% end %>
-<% end %>
diff --git a/test/sandbox/app/components/partial_with_yield_form_component.rb b/test/sandbox/app/components/partial_with_yield_form_component.rb
deleted file mode 100644
index e2ea32f31..000000000
--- a/test/sandbox/app/components/partial_with_yield_form_component.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-class PartialWithYieldFormComponent < ViewComponent::Base
-end
diff --git a/test/sandbox/app/views/shared/_yielding_form_partial.html.erb b/test/sandbox/app/views/shared/_yielding_form_partial.html.erb
deleted file mode 100644
index d4f2ca982..000000000
--- a/test/sandbox/app/views/shared/_yielding_form_partial.html.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-<%= form.label :something do %>
- <%= yield %>
-<% end %>
diff --git a/test/sandbox/test/rendering_test.rb b/test/sandbox/test/rendering_test.rb
index fecb6f0be..ca12f8c6d 100644
--- a/test/sandbox/test/rendering_test.rb
+++ b/test/sandbox/test/rendering_test.rb
@@ -1382,10 +1382,6 @@ def test_render_partial_with_yield
assert_text "hello world", exact: true, normalize_ws: true
end
- def test_render_partial_with_yield_form
- assert_includes render_inline(PartialWithYieldFormComponent.new).css("label").to_html, "world"
- end
-
def test_render_partial_with_yield_and_method_call
render_inline(PartialWithYieldAndMethodCallComponent.new)
assert_text "hello world", exact: true, normalize_ws: true