Opened 13 years ago

Closed 6 years ago

#8584 closed enhancement (patchwelcome)

add a start parameter to dijit.scrollIntoView

Reported by: liucougar Owned by:
Priority: low Milestone: 1.13
Component: Dijit Version: 1.2.3
Keywords: Cc:
Blocked By: Blocking:


the option is basically the same as the native node.scrollIntoView, it determines whether to scroll the element to the start (top/left on LTR, top/right on RTL) of the view, or end of the view

the current behavior of dijit.scrollIntoView can be preserved (choose start or end based on which requires less scroll), if the second parameter is not provided.

Change History (7)

comment:1 Changed 13 years ago by Douglas Hays

I think it makes sense to add an optional boolean that will cause dijit.scrollIntoView to invoke the native node.scrollIntoView(boolean) to make the dijit version more seamless to users migrating over to dojo/dijit, but I don't want to try and emulate the native behavior with the dijit version. This point is important since the left/right behavior described in the ticket description will NOT be honored by the native version (IE forces everything to the far left always (far right with rtl) and other browsers do a minimum scroll wrt left/right). My continuing complaint about the native version is 2 fold: 1) it scrolls all the time even when the node is in full view, and 2) the web page author usually doesn't know whether to use true or false since there's no way to know which is better for the user based on user scrolling. If there are problems with the optimal scroll algorithm in the dijit version, then I'd like to get those fixed. I assume there are scenarios when the native is greatly preferred (even if it's inconsitently implemented across browsers) but it would be nice to better understand those times.

comment:2 Changed 13 years ago by dante

Milestone: tbdfuture

comment:3 Changed 12 years ago by Douglas Hays

Priority: normallowest

I'm still interested in use cases that demonstrate the need to force a DOM node to the top or bottom of the viewport even when its already fully in view.

comment:4 Changed 10 years ago by Colin Snover

Priority: lowestlow

Bulk update of open ticket priorities.

comment:5 Changed 8 years ago by Douglas Hays

Owner: Douglas Hays deleted
Status: newassigned

comment:6 Changed 8 years ago by Douglas Hays

Status: assignedopen

comment:7 Changed 6 years ago by dylan

Milestone: future1.12
Resolution: patchwelcome
Status: openclosed

Given that no one has shown interest in creating a patch in the past 5+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.