Ticket #3732 (closed bug: worksforme)
Fix for css properties problem under IE
| Reported by: | sanaell | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | core | Version: | 1.4a2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description (last modified by brandon) (diff)
it seems have a lot of bugs in Internet Explorer when we use css properties like line-height background-position etc... to fix that problem just have to change in core.js the attr function * old line *
if ( typeof name === "string" )
if ( value === undefined ) {
return this[0] && jQuery[ type || "attr" ]( this[0], name );
change for *
if ( typeof name === "string" )
if ( value === undefined ) {
var camelCase = name.replace(/\-(\w)/g, function(all, letter){
return letter.toUpperCase();
});
return this[0] && jQuery[ type || "attr" ]( this[0], camelCase );
}
That seems to fix a lot of issue...
Attachments
Change History
comment:2 Changed 4 years ago by sanaell
small example : good behavior (with the fix as i put before) http://www.90alaiyon.com/index3.html
bad behavior (with .css usage as normal) http://www.90alaiyon.com/index4.html
Under Internet Explorer --- beware : i use a tricky .css2 just because i m not going to change the core.js for the example, but the behave is exactly like that if we change the attr function as said before
and if we put a camelcase on all .css that be buggy only few case need that...
comment:5 Changed 4 years ago by brandon
- Status changed from new to closed
- Resolution set to fixed
This is already being done in 1.3.x
comment:7 Changed 4 years ago by brandon
- Status changed from closed to reopened
- Resolution fixed deleted
I believe I mis-understood the ticket. Reopening.
comment:8 Changed 3 years ago by john
- Status changed from reopened to closed
- Version changed from 1.2.6 to 1.4a2
- Resolution set to worksforme
As far as I can tell this is already working. http://github.com/jquery/jquery/commit/1ea539b4f08d9056e7e133173f7093908a513f77
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.


Can you give an test case with a small example of something that doesn't work as you expect?