timmywil
4526c8b0a0
Add fallback to prop for the window and document. Switch value to use the property instead of the attribute for back compat.
2011-05-10 00:28:02 -04:00
timmywil
18b1cf2942
Remove value check from formHook; other elements can use value hook
2011-05-07 22:01:10 -04:00
timmywil
8bb6e95b66
Set val before hide/show check and fix easing setting; also update attributes test for autofocus
...
- The object passed should not change so it can be used in future animates, updated src and tests accordingly.
2011-05-07 20:46:38 -04:00
timmywil
c085563270
Reduce the boolean list only to those that have corresponding IDLs that don't require being added to propFix; only set the IDL if it exists
...
- See http://jsfiddle.net/timmywil/u5NLn/ for how boolean attributes are handled in every browser.
2011-05-07 14:49:04 -04:00
timmywil
c72b0f3256
Check empty string instead of specified as specified is inconsistent on the name attribute. Fixes #9148 .
2011-05-06 13:49:20 -04:00
timmywil
cccf9ad91d
Add support for the contenteditable attribute
2011-05-05 12:52:04 -04:00
timmywil
5195335cf4
Set the property corresponding to a boolean attribute when setting to true. Fixes #9103 .
...
- Once boolean properties had been modified natively, setting the attribute no longer set the current value
2011-05-04 15:53:00 -04:00
timmywil
480b88ca37
Set corresponding property to false when removing boolean attributes. Fixes #9094
2011-05-04 11:29:38 -04:00
timmywil
97144424cc
Update boolean check to avoid crashes, add all name fixes to propFix (properties are case-sensitive in all browsers), add tests for prop
2011-05-04 00:31:01 -04:00
John Resig
a9d9f8c542
If no hook is provided, and a boolean property exists, use that to return an attribute-style value for boolean attributes. Fixes #9079 .
2011-05-03 21:44:42 -04:00
timmywil
4ac2fdda2c
Fix setting value attributes on option elements. Fixes #9071 .
2011-05-03 14:48:36 -04:00
timmywil
24a8ffb3ea
Test for a colon in attribute names for IE6/7. Fixes #1591 .
2011-05-01 17:09:50 -04:00
timmywil
5165033883
Add tests data- and aria- attributes and the autofocus boolean attribute and some style updates in jQuery.attr
2011-04-25 12:41:12 -04:00
timmywil
3ac9eb7ce3
Landing pull request [337]( https://github.com/jquery/jquery/pull/337 ). Value of radio inputs resets when type is set after the value in all IEs. Fixes #8570 ([bug]( http://bugs.jquery.com/ticket/8570 )).
2011-04-21 21:33:09 -04:00
timmywil
825d3d96ce
Only use getAttributeNode on buttons when setting value
2011-04-19 13:17:38 -04:00
timmywil
34d80709ce
Fix value attribute and val for value on button elements. Fixes #1954
2011-04-17 18:17:31 -04:00
timmywil
ecf6a3c383
Switch QUnit div from depreceted #main to #qunit-fixture
2011-04-17 02:43:57 -04:00
timmywil
b6d21592cb
Add support for setting the cellPadding attribute in IE6/7
2011-04-14 23:11:49 -04:00
timmywil
ca5bc202ac
IE9's support for SVG elements unfortunately does not extend to clearAttributes. Checks for its presence before proceeding.
2011-04-13 23:45:58 -04:00
timmywil
69866fd2e5
VML.type test was causing multiple test suite fails, fix attributes.js fail in IE6 where the val(String/Number) tests were interfering with the val(Function) tests
2011-04-12 19:32:18 -04:00
louisremi
11adde5127
second batch
2011-04-11 22:33:29 +02:00
timmywil
da89d8768c
Had some stale code in test/unit/attributes.js
2011-04-10 15:40:49 -04:00
timmywil
3a1b4661f5
#8150 - When removing the width and height attributes in IE6/7, setting to "" actually sets to 0 instead of auto
...
- Having fixed this automatically with the use of removeAttribute in browsers that support it, this will fix it for IE6/7 as well.
- This has no effect on width/height styles set elsewhere( test added to removeAttr )
- With this addition, I need to call attr in removeAttr for IE6/7, which means boolean calls like .attr("checked", "") will no longer remove the attribute, which I think is fine. .attr("checked", false) will still remove. If I had left it, it would have gone in an infinite loop since setting to empty string is the only way to remove it in these browsers.
- The hrefNormalized hooks were returning null if they weren't present. Added the null check to the getter.
- Now that the style support fails in IE8 as well due to uppercasing everything, no need to have style included with the hrefNormalized hooks
2011-04-09 17:25:06 -04:00
timmywil
17afd80d48
IE8 testing for lowercasing the css properties on retrieving style; had assumed the style support check failed in IE8, which it now does
2011-04-09 15:56:35 -04:00
timmywil
6f79bee3e3
Normalize css property names to lowercase for comparisons on a .attr('style') call since IE uppercases everything
2011-04-03 19:13:41 -04:00
timmywil
ad2b3bc9f9
Found a problem removing the style attribute in IE
...
- Style is now a special case in IE6/7 to set cssText. My goal is to avoid calling attr again for the performance benefit, and at this point it would also cause an infinite loop for the boolean attributes hooks such as selected & checked. Nevertheless, style seems to be the only one requiring a special call.
2011-04-03 19:13:41 -04:00
timmywil
8cbf551a48
#5413 - Much shorter solution for getting width/height in ie6
...
- #8255 Added support for the list attribute in browsers that support it (it is automatically readonly, but can be set if using getAttribute( name, 2)
2011-04-03 19:13:41 -04:00
timmywil
5fc2281fcc
- Added a hook to swap display none for width and height in browsers that do not sufficiently support get/setAttribute
2011-04-03 19:13:41 -04:00
timmywil
fa4373c11b
Add style attribute support tests to $.attr
2011-04-03 19:13:41 -04:00
timmywil
e0900a686d
Fix issue where non-existant attributes on forms in IE6/7 were throwing errors
2011-04-03 19:13:40 -04:00
timmywil
3892df207d
Add test for bug #3116
2011-04-03 19:13:40 -04:00
timmywil
47c80c2050
Add test for bug#3685, remove added html and add dynamicly to avoid global test suite errors
2011-04-03 19:13:40 -04:00
timmywil
9e05a0a37f
Fix #6562 , tighten up the special code for form objects, add name attrHook for IE6/7, and don't check for undefined with getting hook'd attr
2011-04-03 19:13:40 -04:00
timmywil
102053abd8
Fix #7472 and added test for #3113
...
- Forms with an input that has either name="action" or name="some-other-attr-on-the-form" caused problems in IE6/7. This is fixed.
- Changed check in $.attr for ret === null to typeof ret === "object" to catch any inputs that are accidentally retrieved in IE6/7, since attributes cannot be set to objects and typeof null === "object"
2011-04-03 19:13:39 -04:00
timmywil
2580420b7e
Test description
2011-04-03 19:13:39 -04:00
timmywil
5ac6ca3fa5
Restored 6 tests that I had commented to come back to later to split up between prop and attr. All tests still pass in all browsers.
...
- I should make it clear that I have not removed any tests, but only moved some attr tests to prop where I thought it was appropriate.
2011-04-03 19:13:39 -04:00
timmywil
dbe3b7a9d0
Style edits according to comments from John and rwaldron.
2011-04-03 19:13:39 -04:00
timmywil
8cd30c62d8
Continuing IE7 testing, conditional attr fixes and hooks with feature testing. Will figure out a way to shorten after the test suite passes.
2011-04-03 19:13:39 -04:00
timmywil
5eecb13fa3
Now passes in IE8, changed around $.hasAttr and switched the attrHook for selected to be a propHook
2011-04-03 19:13:38 -04:00
timmywil
de79e8c7e0
Make the new attr/prop changes pass the test suite (in Webkit). There are still errors in IE.
...
+ Added hooks for selected, checked, readonly, disabled to removeAttr if set to falsey
+ Removed all attrs from attrFix, these aren't needed for setAttribute
+ If prop is used for class, do we want a propFix for class?
- We could just assume the user should know to use className with prop. I've done the latter for now.
+ Created tests for $.fn.prop and $.fn.removeProp
- Actually all I did was change broken attr tests to prop where it made sense.
2011-04-03 19:13:38 -04:00
rwldrn
43a41ba7ec
Make sure .val() works after form.reset() in IE. Fixes #2551 .
2011-02-10 23:50:02 +01:00
Colin Snover
e2941d5a98
Update unit tests with a leak detection mechanism for the various jQuery globals and fix all leaks in the tests.
2011-01-09 15:58:47 -06:00
Colin Snover
8e59a99e0a
Change the way jQuery.data works so that there is no longer a chance of collision between user data and internal data. Fixes #6968 .
2011-01-09 15:52:33 -06:00
Colin Snover
3e0cc81504
Clean trailing whitespace from all files.
2010-12-30 00:34:48 -06:00
jeresig
b2ea79c401
Merge branch 'attrFollowupFix' of https://github.com/jitter/jquery into jitter-attrFollowupFix
2010-12-09 12:43:10 -05:00
jeresig
b67154fd10
Merge branch 'support_6897' of https://github.com/rwldrn/jquery into rwldrn-support_6897
2010-12-09 12:33:26 -05:00
Anton M
cc9dbd06e5
Fix attr() problems in IE with attribute nodes. Followup to commit b50f41a2
.
...
IE can't add properties on an attribute-node element, thus we handle it
like text-/comment-nodes.
2010-12-07 03:17:42 +01:00
John Resig
d4a9d45527
Merge branch 'restrictAttr' of https://github.com/jitter/jquery into jitter-restrictAttr
2010-12-06 17:02:00 -05:00
Anton M
df0a3fb853
Handle carriage return characters in className property. Fixes #7673 .
2010-12-01 21:31:22 +01:00
Anton M
b50f41a2e3
Make sure attr() works on non DOM element nodes. Fixes #7202 , #7451 , #7500 .
...
Also added some tests for this attr(name), attr(name, value) and removeAttr(name).
2010-11-13 14:39:28 +01:00