Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#5650 closed defect (fixed)

dojox.image.ThumbnailPicker don't scroll to previous images

Reported by: guest Owned by: dante
Priority: high Milestone: 1.1
Component: Dojox Version: 1.0
Keywords: Cc:
Blocked By: Blocking:


Try in tests


go forward and then try to go back, it doesn't work.
No exception or other error, simply don't move.

Change History (6)

comment:1 Changed 14 years ago by Adam Peller

Owner: changed from Adam Peller to dante

comment:2 Changed 14 years ago by guest

Actually it looks like it just won't scroll back to the first page of images; if you advance to the third page or beyond you can go back again as far as the second page. It's probably got an off-by-one error in its _prev() function (which in its comment is incorrectly claiming it'll display the next page of thumbnails rather than the previous one).

comment:3 Changed 14 years ago by guest

Yup, a quick test shows that if the line:

if(this.thumbScroller[this.isHorizontal ? "scrollLeft" : "scrollTop"] == 0){return;}

in _prev() is changed to:

if(this.thumbScroller[this.isHorizontal ? "scrollLeft" : "scrollTop"] < 0){return;}

then the bug goes away.

comment:4 Changed 14 years ago by guest

Interestingly the above fix works in 1.0.2 but not the nightlies. It appears that a change made to the _showThumbs() function also causes the broken behavior; changing:

var idx = arguments.length == 0 ? this._thumbIndex : arguments[0];


if(!idx){ idx = this._thumbIndex; }

also causes the bug to occur, since idx can legitimately be 0 for the first image. Reverting this change plus applying the change above fixes it in the nightlies.

comment:5 Changed 14 years ago by dante

Resolution: fixed
Status: newclosed

(In [12383]) fixes #5820 (dup and patch) and fixes #5650 (orig) ... patch from Shane O'Sullivan - fixes Thumbnailpicker going to first image.

comment:6 Changed 14 years ago by dante

Milestone: 1.1
Note: See TracTickets for help on using tickets.