Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11825 closed defect (duplicate)

ComboBox drop-down does not take horizontal scroll position into account

Reported by: dcorby Owned by:
Priority: high Milestone: tbd
Component: Dijit - Form Version: 1.4.3
Keywords: Cc:
Blocked By: Blocking:


If a ComboBox? is on a page that is scrollable horizontally, and the page is scrolled to the right, the drop-down for the ComboBox? will appear on the page relative to the ComboBox?'s scrolled position in the viewport.

That is, if the combobox is at (10, 10) on the page, and the viewport is scrolled to (10, 0), the combobox is at viewport position (0, 10), so the popup should be drawn at (0, 10). However, the popup is drawn at (0, 10) relative to the page.

I've tracked down the issue to the following block of code in dijit/form/ComboBox.js (~line 404):

			// If we increased the width of drop down to match the width of ComboBox.domNode,
			// then need to reposition the drop down (wrapper) so (all of) the drop down still
			// appears underneath the ComboBox.domNode
			if(newwidth < this.domNode.offsetWidth){ = dojo.position(this.domNode).x + "px";

By changing the dojo.position call to include a second parameter of true (includeScroll), everything appears correct, and in stepping through the dropdown is actually in the correct position until that line of code is called.

The exact change I made was: = dojo.position(this.domNode, true).x + "px";

Change History (2)

comment:1 Changed 11 years ago by bill

Resolution: duplicate
Status: newclosed

Dup of #11364, fixed in 15.

comment:2 Changed 11 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.