Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative fix for 652 #692

Closed
wants to merge 3 commits into from
Closed

Conversation

tomclose
Copy link

@tomclose tomclose commented Apr 1, 2024

Type of PR (feature, enhancement, bug fix, etc.)

Description

Fixes the handling of

morph '#foo', "<div id='foo'><input><span>Keep me!</span></div>

by making the following tradeoff:

morph '#foo', "<tr id='foo'><td>1</td></tr></tr>" # this won't work (results in "1" being sent as html)
morph '#foo', "<td>1</td>" # but this will work (i.e results in "<td>1</td>" being sent as html)

Note: this is largely a revert of 69cb070

Fixes #652

Why should this be added

#652 is a hard to debug and is easy to run into e.g. when building an autocomplete search box. The real fix for the bug involves an upstream change to Nokogiri, but it's unclear when that will happen. I don't know if this is a good tradeoff or not - just thought I'd propose it as an alternative to #674.

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing

Copy link

netlify bot commented Apr 1, 2024

Deploy Preview for stimulusreflex ready!

Name Link
🔨 Latest commit 8db047d
🔍 Latest deploy log https://app.netlify.com/sites/stimulusreflex/deploys/660b43d698240a000806ba81
😎 Deploy Preview https://deploy-preview-692--stimulusreflex.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@marcoroth
Copy link
Member

@tomclose just wanted to tag you and mention that #696 should be solving this issue! If you get a chance, I'd love to hear how it works for you! Thank you!

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.

Document fragment now do not handle 2 siblings inputs
2 participants