This project is archived and is in readonly mode.

#94 ✓resolved
Yaroslav

Scroller doesn't work in 1.2 RELEASE

Reported by Yaroslav | June 5th, 2008 @ 03:19 PM

Sorry if I'm posting it in wrong format and/or to wrong place, but I've just found a bug in Scroller class and fixed it.

Instead of Element.getPosition() function it seems to be appropriate to use getOffsets(). I'm not sure whether it was bug in getPosition or in Scroller. I fixed it in Scroller.scroll():


  scroll: function(){
    var size = this.element.getSize(), scroll = this.element.getScroll(), pos = this.element.getOffsets(), scrollSize = this.element.getScrollSize(), change = {'x': 0, 'y': 0};
    for (var z in this.page){
      if (this.page[z] < (this.options.area + pos[z]) && scroll[z] != 0)
        change[z] = (this.page[z] - this.options.area - pos[z]) * this.options.velocity;
      else if (this.page[z] + this.options.area > (size[z] + pos[z]) && scroll[z] + size[z] != scrollSize[z])
        change[z] = (this.page[z] - size[z] + this.options.area - pos[z]) * this.options.velocity;
    }
    if (change.y || change.x) this.fireEvent('change', [scroll.x + change.x, scroll.y + change.y]);
  }

There are changes in lines #2 and #6. Hope it helps. Regards

Comments and changes to this ticket

  • Scott

    Scott August 23rd, 2008 @ 07:14 PM

    • Title changed from “Scroller doesn't work in 1.2dev (1555)” to “Scroller doesn't work in 1.2 RELEASE”
    • Tag set to 1.2release, blocker, critical, defect, plugins, scroller

    This fix works. I tested it on 8/23/08 Scroller is COMPLETELY BROKEN in the 1.2 release. This really needs to be done in the 1.2.1 bugfix release.

  • hubevolution

    hubevolution September 22nd, 2008 @ 09:41 AM

    • Tag changed from 1.2release, blocker, critical, defect, plugins, scroller to defect, scroller

    this fix is working on firefox, safari, ie6 but NOT on ie7.

  • Christopher Hlubek

    Christopher Hlubek November 20th, 2008 @ 05:49 PM

    For me this fix works on IE7 too. I would prefer to include this fix in the next MooTools release. Until now the Scroller behaviour is completely broken and it took me some hours to find out it was actually a bug.

  • turl

    turl December 12th, 2008 @ 06:25 PM

    • Tag changed from defect, scroller to critical, defect, patch, plugins, scroller

    I can confirm the patch works. Please implement it ASAP!

  • turl

    turl December 12th, 2008 @ 06:28 PM

    • Tag changed from critical, defect, patch, plugins, scroller to 1.3, 122, critical, defect, patch, plugins, scroller

    (forgot one tag)

  • Aaron Newton

    Aaron Newton February 18th, 2009 @ 11:23 PM

    • Assigned user changed from “Valerio” to “Aaron Newton”
    • State changed from “new” to “resolved”
    • Milestone cleared.

    Will be fixed for the 1.0 release of MooTools -more (eta, end of Feb/beginning of Mar 2009)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Pages