Skip to content

lower threshold triggered unexpectedly #15

@sfeast

Description

@sfeast

Description

Setting the lowerThreshold property to a falsy value does not fully disable lower threshold trigger events when reaching the bottom of the scrolling region.

Expected outcome

When setting lowerThreshold to a falsy value, this component no longer fires the lower-threshold event or set lowerTriggered to true.

Actual outcome

When setting lowerThreshold to a falsy value, the component does fire the lower-threshold event & set lowerTriggered to true in this specific case.

Live Demo

No demo here, but I think the error in the code is easy to see - https://github.com/PolymerElements/iron-scroll-threshold/blob/master/iron-scroll-threshold.html#L205

Specifically when lowerScrollValue is 0 (i.e. the bottom of the scroll region is reached) then this if statement will always evaluate to true.

Steps to reproduce

I don't have a demo but generally: Set lowerThreshold to false & then scroll to the bottom of the scrolling region.

Browsers Affected

All browsers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions