Patches item #477798, was opened at 2001-11-03 08:23
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305757&aid=477798&group_id=5757

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Andy Short (sh0rtie)
Assigned to: Richard Bennett (richard_bennett)
Summary: dimensions patch for IE6 using doctypes

Initial Comment:
When looking for the bodys width/height in IE6 using:

DynAPI.document.getWidth()
DynAPI.document.getHeight()

if the document has a valid doctype either XHTML or 4 +
IE6 runs in a CSS1 compatible strict mode when certain 
doctypes are present. In that case the documentElement 
represents the canvas, not the body element therefore
findimensions() was returning 0 using 
this.doc.body.clientHeight and a strict/xhtml doctype

added a check for wether the document was in 
strictmode or not and used 
this.doc.documentElement.clientHeight

basically if you write HTML or XHTML using doctypes 
and you use the documents body's width/height in your 
code you will need this for correct display in IE6


----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2002-08-11 04:23

Message:
Logged In: NO 

The Alert box reads:

document.body.clientHeight = 438
document.compatMode = undefined
document.documentElement.clientHeight = undefined

Using IE 5.2.1 for Mac OS X 10.1.5 on
an iMac at 800 x 600 screen resolution

----------------------------------------------------------------------

Comment By: Max Nokhrin (mno)
Date: 2002-01-22 15:09

Message:
Logged In: YES 
user_id=373738

THANK YOU THANK YOU THANK YOU!!!

There is also a bug in IE6 that returned an incorrect 
clientHeight and clientWidth. Your file fixes that error! 

Thank you very much!

----------------------------------------------------------------------

Comment By: martin ström (marstr)
Date: 2001-11-12 02:39

Message:
Logged In: YES 
user_id=46384

if this.strict could test for mozilla's strict mode aswell 
i think this would be the best.

can't we use the test you had on 
http://www.richardinfo.com/case_studies/doctypes.html

to detect which mode ie5mac, ie6 or mozilla is in?
and add this to browser.js

----------------------------------------------------------------------

Comment By: Richard Bennett (richard_bennett)
Date: 2001-11-05 15:10

Message:
Logged In: YES 
user_id=164855

Thanks for testing that.

<<i think a is.strict is best while other browsers
<<go into strict mode aswell, and then we can use
<<is.strict to identify different modes.

That would mean we would have to do if (is.strict&&is.IE6)
Is that the best way?
Bear in mind that the code to test for strict mode in 
IE5/Mac, and Mozilla is a lot more involved than for IE6.
Should we add all that in now, or just the IE6 part to 
start with?

Also, I noticed that HEX colors have to be started with the 
# sign, or they don't show in IE6 Strict mode.
Something else to keep in mind.


----------------------------------------------------------------------

Comment By: martin ström (marstr)
Date: 2001-11-05 09:06

Message:
Logged In: YES 
user_id=46384

i've tested on mac ie5:

document.body.clientHeight = 466
document.compatMode = undefined
document.documentElement.clientHeight = undefined

which leads to this is ie6 only.

i think a is.strict is best while other browsers
go into strict mode aswell, and then we can use
is.strict to identify different modes.


----------------------------------------------------------------------

Comment By: Andy Short (sh0rtie)
Date: 2001-11-05 08:48

Message:
Logged In: YES 
user_id=176079

With regard to the strict mode on a mac, not having access 
to a mac i couldnt test this behaviour in ie5 , i believe 
this behaviour only applies to ie6.

re the check, i put the check within the dyndocument to try 
and keep the change to one file, it might be worth adding 
this check to the browser.js and use if(is.ie6strict) 
method as mozilla isnt affected and believed ie5 on a mac 
isnt either, tho this should really be confirmed before 
committing these changes to the cvs.

thanks
 ... sh0rtie

----------------------------------------------------------------------

Comment By: Richard Bennett (richard_bennett)
Date: 2001-11-04 15:56

Message:
Logged In: YES 
user_id=164855

Hi,
Have you any idea if IE5/MAC has the same difference when 
running under "strict" mode?
I added a test for this in the /tests directory in CVS, 
here:
<wrap>
http://cvs.sourceforge.net/cgi-
bin/viewcvs.cgi/~checkout~/dynapi/dynapi/tests/doctype_clien
tHeight.html?rev=HEAD&content-type=text/html
</wrap>

Wouldn't it be best to do the doctype-sniffing in 
browser.js?
If so, like this:
if(is.strict&&is.IE6) 
or like this? :
if(is.IE6Strict)?

Richard.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305757&aid=477798&group_id=5757


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/dynapi-dev@lists.sourceforge.net/

Reply via email to