New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS scroll position history broken in A4 #1342

Closed
tavelli opened this Issue Apr 1, 2011 · 9 comments

Comments

Projects
None yet
6 participants
@tavelli

tavelli commented Apr 1, 2011

Was working great in A3, still works in chrome on my iMac.

to reproduce:

Device: iPhone 3GS, iOS 4.3

@toddparker

This comment has been minimized.

Show comment
Hide comment
@toddparker

toddparker Apr 1, 2011

Contributor

This must have been a last minute regression. Bumping this to a blocker. Thanks for reporting.

Contributor

toddparker commented Apr 1, 2011

This must have been a last minute regression. Bumping this to a blocker. Thanks for reporting.

@scottjehl

This comment has been minimized.

Show comment
Hide comment
@scottjehl

scottjehl Apr 7, 2011

Contributor

Okay so this was introduced when I moved the "listbox" role and related focus management out of listview and into select (where that role and management makes sense). Otherwise, we had tabindex attrs on all listview LIs, and that seemed to prevent iOS from jumping to them on focus. Now that LIs have no tabindexes, the anchors are findable and iOS scrolls to them instead of the previous scroll location.

Contributor

scottjehl commented Apr 7, 2011

Okay so this was introduced when I moved the "listbox" role and related focus management out of listview and into select (where that role and management makes sense). Otherwise, we had tabindex attrs on all listview LIs, and that seemed to prevent iOS from jumping to them on focus. Now that LIs have no tabindexes, the anchors are findable and iOS scrolls to them instead of the previous scroll location.

@scottjehl

This comment has been minimized.

Show comment
Hide comment
@scottjehl

scottjehl Apr 7, 2011

Contributor

To ensure focus and scrollTo don't conflict (when possible), I set the focus order on page show to 1) previously clicked item if revisiting that page 2) page title 3) first focusable item in the page. Closed by 97f5a95

Contributor

scottjehl commented Apr 7, 2011

To ensure focus and scrollTo don't conflict (when possible), I set the focus order on page show to 1) previously clicked item if revisiting that page 2) page title 3) first focusable item in the page. Closed by 97f5a95

@scottjehl scottjehl closed this Apr 7, 2011

@eddiemonge

This comment has been minimized.

Show comment
Hide comment
@eddiemonge

eddiemonge Apr 11, 2011

Contributor

This should be reopened since it breaks the example at jquery-mobile/index.html.
If you try to switch the theme, the page tries to scroll to a hidden element and scrolls overflow elements causing the page layout to break.

it just breaks accessibility

We need it ... we just have to make the timing predictable/correct

for example, the silentScroll() done near it is an async scroll

so if the focus happens before the scroll we'll get this problem

in theory we need to 1. Flush Rendering (so everything is sized properly)

  1. Scroll to the previous position
  2. Set focus

unfortunately right now 1 and 2 are async

we need to fix that

Contributor

eddiemonge commented Apr 11, 2011

This should be reopened since it breaks the example at jquery-mobile/index.html.
If you try to switch the theme, the page tries to scroll to a hidden element and scrolls overflow elements causing the page layout to break.

it just breaks accessibility

We need it ... we just have to make the timing predictable/correct

for example, the silentScroll() done near it is an async scroll

so if the focus happens before the scroll we'll get this problem

in theory we need to 1. Flush Rendering (so everything is sized properly)

  1. Scroll to the previous position
  2. Set focus

unfortunately right now 1 and 2 are async

we need to fix that

@toddparker toddparker reopened this Apr 12, 2011

@toddparker

This comment has been minimized.

Show comment
Hide comment
@toddparker

toddparker Apr 12, 2011

Contributor

Agreed. I just re-opened.

Contributor

toddparker commented Apr 12, 2011

Agreed. I just re-opened.

@ghost ghost assigned jblas Apr 12, 2011

ray58750034 pushed a commit that referenced this issue Apr 16, 2011

scottjehl
To ensure focus and scrollTo don't conflict (when possible), I set th…
…e focus order on page show to 1) previously clicked item if revisiting that page 2) page title 3) first focusable item in the page. Fixes #1342

ray58750034 pushed a commit that referenced this issue Apr 16, 2011

Merge branch 'master' of https://github.com/jquery/jquery-mobile into…
… fr_1177

* 'master' of https://github.com/jquery/jquery-mobile:
  [astounding] fixed css that locked ie in the navigation unit tests. tagged so I can show my kids some day
  Fix for issues:
  set version to 1.0a4.1
  wrapped the else if/else in an else to prevent an unnecessary dom walk until we have to make it.
  To ensure focus and scrollTo don't conflict (when possible), I set the focus order on page show to 1) previously clicked item if revisiting that page 2) page title 3) first focusable item in the page. Fixes #1342
@scottjehl

This comment has been minimized.

Show comment
Hide comment
@scottjehl

scottjehl Jun 20, 2011

Contributor

This fix landed in the navigation refactor. Focus waits for silentScroll's event to fire now. Thanks!

Contributor

scottjehl commented Jun 20, 2011

This fix landed in the navigation refactor. Focus waits for silentScroll's event to fire now. Thanks!

@scottjehl scottjehl closed this Jun 20, 2011

@eirikhm

This comment has been minimized.

Show comment
Hide comment
@eirikhm

eirikhm Aug 22, 2011

This issue is still valid for http://jquerymobile.com/test/ for iOS 4.1. For 4.3.2 it seems to work, but it loads the previous page scrolled to top, then pops down.

eirikhm commented Aug 22, 2011

This issue is still valid for http://jquerymobile.com/test/ for iOS 4.1. For 4.3.2 it seems to work, but it loads the previous page scrolled to top, then pops down.

@scottjehl scottjehl reopened this Aug 22, 2011

@scottjehl

This comment has been minimized.

Show comment
Hide comment
@scottjehl

scottjehl Aug 22, 2011

Contributor

Yep. Thanks. We've got a branch about ready to land that'll fix it again.

Contributor

scottjehl commented Aug 22, 2011

Yep. Thanks. We've got a branch about ready to land that'll fix it again.

@scottjehl

This comment has been minimized.

Show comment
Hide comment
@scottjehl

scottjehl Sep 7, 2011

Contributor

Okay! This is fixed again in master. Thanks for keeping on it :)

Contributor

scottjehl commented Sep 7, 2011

Okay! This is fixed again in master. Thanks for keeping on it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment