Skip to content

Affix doesn't update in iOS UIWebview #16202

Closed
@mhemesath

Description

@mhemesath

In UIWebview scroll events aren't fired. This has the effect of making affix look buggy as its position isnd't updated until after scroll is done. To mitigate the effects of this, we could add a touchmove event listener to update the affix position when the user is scrolling via moving their finger.

    this.$target = $(this.options.target)
      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
      .on('touchmove.bs.affix.data-api', $.proxy(this.checkPosition, this))
      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions