Skip to content
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

Scrolling to Top Android Mobile Chrome and Firefox #1741

Closed
cswroe opened this issue Jan 19, 2019 · 2 comments
Closed

Scrolling to Top Android Mobile Chrome and Firefox #1741

cswroe opened this issue Jan 19, 2019 · 2 comments

Comments

@cswroe
Copy link

cswroe commented Jan 19, 2019

I am noticing that the page is jumping all the way to the top on Chrome Mobile and Firefox on Android. I do not see that same action in DuckDuckGo or LastPass browser.

Running latest commit as of 1/12/2019

Steps to reproduce the behavior:
Open webpage. Scroll down and it will jump back to top. After the first time, I can scroll down but once I start scrolling up at all, it will jump to top.

Test Device was a Pixel 2

The code is pretty vanilla. I tried with/without responsive collapse and header filters, moveable columns, different layouts, but the same result.
var table = new Tabulator("#opd-table", {
pagination:"local",
paginationSize:15,
movableColumns:true,
layout:"fitDataFill",
responsiveLayout:"collapse",
columns:[
{title:"Date",field:"Date", headerFilter:"input"},
{title:"Time",field:"Time", headerFilter:"input",responsive:2},
{title:"Incident #",field:"Incident #", headerFilter:"input",responsive:3},
{title:"Nature", field:"Nature", headerFilter:"input"},
{title:"Address",field:"Address", formatter:"html",headerFilter:"input",align:"center",width:200},

A video showing what is happening in Chrome, Firefox, LastPass and DuckDuckGo: https://youtu.be/wcuEHN_EyJ0 sorry, the blank section is last pass browser, it must block screen recording.

Thought it may be php or fget, but the same result on a plain html page.
http://www.openpolicedata.com/CedarLakeIN/CFS/2017CFS.php
http://www.openpolicedata.com/CedarLakeIN/CFS/2017CFS.htm

@cswroe cswroe changed the title Scrolling to Top Scrolling to Top Android Mobile Chrome and Firefox Jan 19, 2019
@cswroe
Copy link
Author

cswroe commented Jan 20, 2019

After messing with this, it looks like specifying the height resolves the larger issue, but still experience some odd scrolling. Once I turned off the collapsing responsive layout and specified the height, it seems to work okay although I now have the scrolling horizontal to deal with. It is probably the same or at least related to #1701 & #1437

Update: After working with it some more, I was able to get the collapsing responsive layout to work correctly in chrome by setting the height to auto.
pagination:"local", paginationSize:12, height:"auto", movableColumns:true, layout:"fitDataFill", responsiveLayout:"collapse",

Firefox is still a disaster and there is a weird issue in Chrome that if you scroll down and select the next page it jumps to the top, but if you slightly scroll up, it will paginate without jumping. Example of both: https://youtu.be/SeUHBnlcsOg I have reverted back to specifying the height to a number and removing the responsive collapse since that seems to be the best resolution at this time.

Sorry for all the updates/edit, hope they provided more insight than frustration.

Combine or close this as needed.

@olifolkerd
Copy link
Owner

With no height set the table will render in classic render mode where it will draw all rows on the table at once. in this mode it is essentially a dumb HTML table therefor any scrolling effects you are experiencing will be caused by the page that the table is on as it has no ability to scroll itself.

Tabulator will only scroll internally in the table if you have the height set on the table at which point it will use the virtual DOM and only display a certain number of rolls and a scroll bar.

I hope that makes a bit more sense,

Cheers

Oli :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants