Bug Tracker

Ticket #3117 (assigned bug)

Opened 6 months ago

Last modified 5 months ago

$(window).height() problem in opera 9.5

Reported by: michalhtm Assigned to: flesler (accepted)
Type: bug Priority: major
Milestone: 1.3 Component: dimensions
Version: 1.2.6 Keywords:
Cc: emartin24, michalhtm Needs: Test Case

Description

There is problem in opera 9.5 if the page is longer (scrollbars showed)

$(window).height()

returns

$(document).height()

I think repair to it is using

document.getElementsByTagName('html')[0].clientHeight

(it shows correct value)

Attachments

dimensions[5759].diff (0.7 kB) - added by flesler 6 months ago.

Change History

Changed 6 months ago by flesler

  • owner set to flesler
  • status changed from new to assigned
  • component changed from fx to dimensions

I had this problem on jQuery.ScrollTo.. and I think I fixed like this (next patch). Can you apply the past and re-test please ?

Changed 6 months ago by flesler

Changed 5 months ago by emartin24

Just wanted to check on the status...I just ran into this issue and the suggested patch seems to resolve it.

Changed 5 months ago by flesler

That's great. Brandon is busy, but if you provide a test case where I see this patch actually working as expected, I'll commit it myself.

Changed 5 months ago by flesler

  • cc set to emartin24, michalhtm
  • need changed from Review to Test Case
  • milestone set to 1.3

Changed 5 months ago by emartin24

I put a simple page up that shows the fix in action: http://www.ericmmartin.com/code/jquery/3117/

With Opera 9.5+ - Click before, click TEST. There is supposed to be a modal dialog, but because if the incorrect height value, it is not in the viewport. Click the overlay to close it, and see the incorrect height value being reported.

- Click after, click TEST. The dialog is now in the viewport and you will see the correct height being reported.

In any other browser, both pages behave the same way.

-Eric

Note: See TracTickets for help on using tickets.