Skip to main content

Bug Tracker

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)
  • index5.html (1.1 KB) - added by sanaell December 26, 2008 05:58PM UTC.

    test-case very simple

Change History (7)

Changed December 23, 2008 03:34PM UTC by davidserduke comment:1

need: CommitTest Case

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

Changed December 26, 2008 05:33PM UTC by sanaell 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 brandon 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 01:16AM UTC by brandon comment:4

milestone: 1.31.3.3

see also #3667

Changed March 18, 2009 03:12AM UTC by brandon comment:5

resolution: → fixed
status: newclosed

This is already being done in 1.3.x

Changed May 16, 2009 04:30PM UTC by brandon comment:6

resolution: fixed
status: closedreopened

I believe I mis-understood the ticket. Reopening.

Changed December 22, 2009 04:55PM UTC by john comment:7

resolution: → worksforme
status: reopenedclosed
version: 1.2.61.4a2