Side navigation
#3732 closed bug (worksforme)
Opened December 21, 2008 01:19AM UTC
Closed December 22, 2009 04:55PM UTC
Fix for css properties problem under IE
Reported by: | sanaell | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | core | Version: | 1.4a2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
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 (1)
Change History (7)
Changed December 23, 2008 03:34PM UTC by comment:1
need: | Commit → Test Case |
---|
Changed December 26, 2008 05:33PM UTC by comment:2
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...
Changed March 18, 2009 01:15AM UTC by comment:3
description: | 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... → 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... |
---|
Changed March 18, 2009 03:12AM UTC by comment:5
resolution: | → fixed |
---|---|
status: | new → closed |
This is already being done in 1.3.x
Changed May 16, 2009 04:30PM UTC by comment:6
resolution: | fixed |
---|---|
status: | closed → reopened |
I believe I mis-understood the ticket. Reopening.
Changed December 22, 2009 04:55PM UTC by comment:7
resolution: | → worksforme |
---|---|
status: | reopened → closed |
version: | 1.2.6 → 1.4a2 |
As far as I can tell this is already working.
http://github.com/jquery/jquery/commit/1ea539b4f08d9056e7e133173f7093908a513f77
Can you give an test case with a small example of something that doesn't work as you expect?