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

Stealth-empty input to replaceWith leaves content in place #2204

Closed
gibson042 opened this issue Apr 13, 2015 · 2 comments
Closed

Stealth-empty input to replaceWith leaves content in place #2204

gibson042 opened this issue Apr 13, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@gibson042
Copy link
Member

@gibson042 gibson042 commented Apr 13, 2015

e.g., $collection.replaceWith([""]) is a no-op: http://jsfiddle.net/w03Lertu/

@gibson042 gibson042 added this to the 3.0.0 milestone Apr 13, 2015
gibson042 added a commit to gibson042/jquery that referenced this issue Apr 13, 2015
gibson042 added a commit to gibson042/jquery that referenced this issue Apr 13, 2015
@gibson042 gibson042 self-assigned this Apr 17, 2015
@markelog
Copy link
Member

@markelog markelog commented Apr 20, 2015

Is that a real use-case? Since in this docs i see -

May be an HTML string, DOM element, array of DOM elements

Since this would not be "array of DOM elements". What is byte-size and perf hit?

@gibson042
Copy link
Member Author

@gibson042 gibson042 commented Apr 20, 2015

This is necessary for gh-1747, because intercepted HTML can be replaced with an empty string.

markelog added a commit to markelog/jquery that referenced this issue Apr 20, 2015
gibson042 added a commit that referenced this issue Apr 30, 2015
Fixes gh-2204
Ref 642e9a4
Closes gh-1752
Closes gh-2206

(cherry picked from commit 4b27ae1)

Conflicts:
	src/manipulation.js
	test/unit/manipulation.js
@gibson042 gibson042 closed this in 4b27ae1 Apr 30, 2015
@dmethvin dmethvin modified the milestones: 1.12/2.2, 3.0.0 Jan 7, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants