Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1875 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

Calendar Picker javascript gets position wrong when scrolled in IE7

Reported by: nickmurdoch Owned by: Chris Arndt
Priority: normal Milestone: 1.0.x bugfix
Component: TG Widgets Version:
Severity: normal Keywords: needs review


Hi all,

I've been writing out pages using Genshi's xhtml renderer, which I beleive is triggering a bug in the Calendar.js for IE, due to IE's broken document.body.scrollTop attribute. Googling seems to  suggest using document.documentElement.scrollTop instead.

I'm not quite sure how to include diffs of a compacted JavaScript? file where everything's on one line, but the clause in question is


which starts on line 14, character 26081. Changing it to the following makes it work:


This seems to be the problem if Genshi is outputting HTML or XHTML -- possibly a bug in IE if it's in standards-compliant mode?

Change History

comment:1 Changed 11 years ago by nickmurdoch

(Forgot to mention what the actual problem is -- the pop-up Calendar displays in the wrong place if the user is scrolled down, even off the top of the visible viewpane if they're scrolled down enough)

comment:2 Changed 11 years ago by Chris Arndt

@nickmurdoch: I don't quite understand you explanation of the symptom. Can you provide a screenshot, maybe?

Can somebody on Windows with an IE7 confirm that the suggested fix works?

comment:3 Changed 11 years ago by nickmurdoch

Hi Chris,

 http://zoidberg.nevira.net/~flexo/stuff/calendarwidgetbug.png is a screenshot I took of the website in question -- sorry it's mostly blurred out; it's a customer's site. In the screenshot, I'd clicked the bottom-most 'Choose' button on the page.

If I scroll down further and click 'Choose' again, the calendar widget appears progressively further up the page until it disappears off the top.

I'm using genshi as the rendering engine, with genshi.default_doctype left commented out in the config file. The header generated for the page is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


The content-type served is: "Content-Type: text/html; charset=utf-8"

comment:4 Changed 11 years ago by Chris Arndt

  • Status changed from new to assigned
  • Keywords needs review added
  • Owner changed from anonymous to Chris Arndt

Thanks, Nick, for the screenshot. I now see what the problem is. Unfortunately, I don't have a Windows machine with IE7 to test this at the moment.

If a second person can confirm that the attached fix works and doesn't break other IE versions, I'll gladly apply the patch.

comment:5 Changed 11 years ago by chrisz

  • Status changed from assigned to closed
  • Resolution set to fixed

I could reproduce this with MSIE7 and the widget browser where the position was so far off that it did not even show. The patch works and is also mentioned  here, so applied it in r5322.

Note: See TracTickets for help on using tickets.