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

Browser history handling in ufTable / tablesorter #712

Closed
alani1 opened this issue May 20, 2017 · 2 comments
Closed

Browser history handling in ufTable / tablesorter #712

alani1 opened this issue May 20, 2017 · 2 comments
Labels
confirmed bug Something isn't working frontend The frontend interface
Milestone

Comments

@alani1
Copy link

alani1 commented May 20, 2017

In the admin panel ufTable adds parameters for sorting / filtering / pagination to the url. This adds additional entries in the browser history and affects usability when navigating with "Back"-Button.

Example:
Original URL: http://localhost/admin/users
is rewritten to
http://localhost/admin/users#&sort[table-users][name]=asc&page[table-users]=1&size[table-users]=10

When using two seprate ufTables on one page, the situation becomes worse as suddenly not two but 6 entries are created in the Browser History. the correct behaviour would probably be to remove / delete the original entry from the History.

@alexweissman alexweissman added confirmed bug Something isn't working frontend The frontend interface labels May 20, 2017
@alexweissman alexweissman modified the milestone: 4.x Jun 1, 2017
@alexweissman alexweissman modified the milestones: 4.x, 4.1.x Jun 18, 2017
@alexweissman
Copy link
Member

@alani1 This appears to be an interaction between the sort2Hash and saveSort Tablesorter widgets].

sort2Hash stores the current sort/filter state in the URL hash, adding a new entry to the browser history for each change. Meanwhile saveSort rebuilds the hash when you visit a page, effectively creating the two history entries (one for the original, and one with the hash).

One option is to simply disable either the sort2Hash or saveSort widget on your tables. It would be good, though, if saveSort did not create another browser history entry.

@alexweissman
Copy link
Member

Fixed as of v4.1.9; see 65384c4

I've submitted a PR to the main Tablesorter repo as well, so hopefully we won't need this temporary patch once the PR gets approved and released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed bug Something isn't working frontend The frontend interface
Projects
None yet
Development

No branches or pull requests

2 participants