Skip to content

Yielded content gets insertet at wrong location when used with Rails' form helpers#2617

Open
doits wants to merge 1 commit intoViewComponent:mainfrom
doits:outside_label_bug
Open

Yielded content gets insertet at wrong location when used with Rails' form helpers#2617
doits wants to merge 1 commit intoViewComponent:mainfrom
doits:outside_label_bug

Conversation

@doits
Copy link
Copy Markdown

@doits doits commented Apr 24, 2026

When passing the from helper to a shared partial which yields some content, the content gets inserted at the wrong location.

In this test it should be inside the label tag – <label>world</label> – but it is rendered outside: world <label></label>.

For now this MR just adds a failing test for you to reproduce which is the way bug reports are expected according to the issue template.

Is there somebody that can take a look at this? Thank you very much.

When passing the from helper to a shared partial which yields some
content, the content gets inserted at the wrong location.

In this test it should be inside the label tag – `<label>world</label>`
– but it is rendered outside: `world <label></label>`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant