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

Bug(Derived from the official): Tabs(a[data-toggle="tab"][href="#..."]) push browser history twice #119

Closed
yuki-takei opened this issue Jul 2, 2017 · 2 comments

Comments

@yuki-takei
Copy link
Member

yuki-takei commented Jul 2, 2017

Environment

  • [crowi-plus] 1.2.13
  • [node.js] 6.10.0
  • [browser] Firefox 52.2.1

How to reproduce? (再現手順)

  1. Goto /admin/customize and enable "タブ変更をブラウザ履歴に保存" option
  2. Access to any wiki page
  3. Click "Edit" tab ("#edit-form" hash will be added to url)
  4. Click "History" tab ("#revision-history hash will be added to url)
  5. Click "Edit" tab again ("#edit-form" hash will be added to url)
  6. Browser back x N times

What happens? (症状)

  • 1st back: "#revision-history" is shown
  • 2nd back: "#revision-history" is still shown
  • 3rd back: "#edit-form" is shown
  • 4th back: "#edit-form" is still shown
  • 5th back: the page without hash is shown

What is the expected result? (期待される動作)

  • 1st back: "#revision-history" is shown
  • 2nd back: "#edit-form" is shown
  • 3rd back: the page without hash is shown

Note

  • This is a bug from official Crowi
@yuki-takei yuki-takei changed the title Bug: #edit-form and #revision-history links push history twice Bug: #edit-form and #revision-history links push browser history twice Jul 2, 2017
@yuki-takei yuki-takei changed the title Bug: #edit-form and #revision-history links push browser history twice Bug: Tabs(a[data-toggle="tab"][href="#..."]) push browser history twice Jul 2, 2017
@yuki-takei
Copy link
Member Author

yuki-takei commented Jul 2, 2017

This problem couldn't be solved completely...
Unexpected behavior still caused in the following case.

How to reproduce?

  1. Goto /admin/customize and enable "タブ変更をブラウザ履歴に保存" option
  2. Access to wiki page A
  3. Access to wiki page B
  4. Click "Edit" tab ("#edit-form" hash will be added to url)
  5. Browser back x N times

What happens?

  • 1st back: page B with "#" is shown
  • 2nd back: page B without hash is still shown
  • 3rd back: page A is shown

What is the expected result?

  • 1st back: page B (with or without "#") is shown
  • 2nd back: page A is shown

@yuki-takei
Copy link
Member Author

If this is annoying, disable "タブ変更をブラウザ履歴に保存" option.

image

@yuki-takei yuki-takei changed the title Bug: Tabs(a[data-toggle="tab"][href="#..."]) push browser history twice Bug(Derived from the official): Tabs(a[data-toggle="tab"][href="#..."]) push browser history twice Jul 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant