Opened 15 years ago

Closed 15 years ago

#3135 closed defect (fixed)

IE scrolls window when a menu is opened if not at top of page

Reported by: simonjb Owned by: bill
Priority: high Milestone: 0.9beta
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


If a menu is opened on IE (6 and 7, with mouse or keyboard) and the browser is not at the top of the page then rather than showing the menu the window scrolls towards the top of the page. To reproduce:

  • open dijit/tests/test_Menu.html in IE
  • scroll down
  • right click

Attachments (2)

MenuScrollOption1.diff (315 bytes) - added by simonjb 15 years ago.
MenuScrollOption2.diff (592 bytes) - added by simonjb 15 years ago.

Download all attachments as: .zip

Change History (4)

Changed 15 years ago by simonjb

Attachment: MenuScrollOption1.diff added

Changed 15 years ago by simonjb

Attachment: MenuScrollOption2.diff added

comment:1 Changed 15 years ago by simonjb

Owner: changed from simonjb to bill

I don't think I understand the problem well enough to recommend a solution but I've found 2 possible solutions that work:

Remove the call to dijit.util.scroll.scrollIntoView

  • !MenuScrollOption1.diff
  • the call does not currently seem to be working -- Firefox and WebKit do not show the same behaviour as IE but neither is the browser scrolled to show the menu item being focused; for example on FF if you make your browser window small vertically so that a menu will not fit on screen, open the menu, and move focus down with the down arrow key: the menu closes when you reach the bottom of the screen rather than scrolling to the item that is off-screen
  • it would be nice to not have to remove this call if there was some way to support menus larger than the screen and either scroll the window or scroll the menu within the window

Change the test for IE in dijit.util.scroll.scrollIntoView

  • !MenuScrollOption2.diff
  • I tried changing the test from "dojo.marginBox(node.parentNode).h <= node.parentNode.scrollHeight" to "dojo.marginBox(node.parentNode).h < node.parentNode.scrollHeight"
  • seems to solve this particular problem but I'm not sure if it introduces others; at one point it looks like the test was in fact "<" but was changed [6496]

comment:2 Changed 15 years ago by bill

Resolution: fixed
Status: newclosed

Checked in option #1, rev [9109].

Note: See TracTickets for help on using tickets.