Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#10875 closed defect (fixed)

Dijit.Menu list moves away from button on page resize in RTL language

Reported by: klemanski Owned by: bill
Priority: high Milestone: 1.6
Component: Dijit Version: 1.3.2
Keywords: dijit.Menu, RTL, resize Cc: klemanski@…
Blocked By: Blocking:

Description (last modified by bill)

Steps to reproduce:

  1. Change browser to a RTL language (such as Arabic)
  2. Click on a diji.Menu button that has list items
  3. While the drop-down list is still showing, begin to re-size the browser window (I was using Firefox 3.6)

Expected: Although the browser is re-sized, the drop-down list should stay directly under the button

Actual: The drop-down list moves away from the button and around the page.

Note: This is not reproducible in English, German, French etc. It seems to be only in RTL languages.

Change History (5)

comment:1 Changed 9 years ago by bill

Actually, resizing a browser window doesn't work with popups in LTR mode either, see for example #5777.

comment:2 Changed 9 years ago by bill

Description: modified (diff)
Milestone: tbd1.6

comment:3 Changed 9 years ago by bill

Owner: set to bill
Status: newassigned

comment:4 Changed 9 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [22546]) Close popups when browser window is resized/scrolled, or when a nested div (ex: pane in a BorderContainer) is scrolled. Fixes #5777, #10547, #10875 !strict.

comment:5 Changed 8 years ago by bill

(In [23866]) Changes related to closing/repositioning popups on scroll / resize:

  • Rollback (erase) code to close popups on window resize (refs #5777, fixes #12317) and mouse wheel (refs #12297).
  • When possible, don't close popups when the browser window is scrolled using the mouse on the browser scroll bar. Popups still close by clicking anywhere else on the page, including inner scrollbars. Unfortunately on IE6 & 7, clicking the browser scrollbar also still causes popups to close.
  • In RTL mode, make place.js set popup.style.right rather than popup.style.left, so that on screen resize (at least in the common case) the popup and the aroundNode stay aligned. (refs #10875)

Background:

  • It's often harmful that resizing a window closes the popup; the user may be expanding the window to see all of the popup. Although resizing can cause a reflow, separating the aroundNode from the popup, but often it doesn't. The case of centered/right-aligned elements mentioned in #5777 is an exception.
  • Closing popups on scroll is also questionable. Scrolling the main window will scroll the aroundNode and the popup together, so it's counterproductive to close the popup. OTOH, scrolling a <div> will separate the aroundNode from the popup. And for a mousewheel event it's hard to tell whether it's affecting the main window or a nested <div>.

In the future, I'll add code to actually reposition popups when a browser window resize or a scroll has caused the aroundNode to move.

!strict.

Note: See TracTickets for help on using tickets.