Landing pull request 332. Appending disconnected radio or checkbox inputs and keeping checked setting Fixes #8060, #8500.
More Details: - https://github.com/jquery/jquery/pull/332 - http://bugs.jquery.com/ticket/8060 - http://bugs.jquery.com/ticket/8500
This commit is contained in:
parent
3ac9eb7ce3
commit
d274b7b9f7
4 changed files with 95 additions and 44 deletions
|
@ -186,6 +186,14 @@ jQuery.support = (function() {
|
|||
support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
|
||||
div.innerHTML = "";
|
||||
|
||||
// Check if a disconnected checkbox will retain its checked
|
||||
// value of true after appended to the DOM
|
||||
input = document.createElement("input");
|
||||
input.setAttribute("type", "checkbox");
|
||||
input.checked = true;
|
||||
div.appendChild( input );
|
||||
support.appendChecked = input.checked;
|
||||
|
||||
// Check if div with explicit width and no margin-right incorrectly
|
||||
// gets computed margin-right based on width of container. For more
|
||||
// info see bug #3333
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue