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

if title/placeholder enabled, select value changes when pressing back in browser #1023

Closed
Khrysller opened this issue May 12, 2015 · 14 comments

Comments

@Khrysller
Copy link

Just found an issue with the last master, v1.7.0.

How to replicate: Create a form with some selectboxes, submit the form, press back in the browser to go back to the form. the selectbox highlight the next option instead the option selected.

@Khrysller
Copy link
Author

any thoughts on this? thanks

@caseyjhol

@caseyjhol
Copy link
Member

Any chance you can link me to an example?

@Khrysller
Copy link
Author

@caseyjhol any webpage with a select submiting to another page (or even maybe to the same page), when press back in the browser will select the previous options +1

@caseyjhol
Copy link
Member

It's possible the most recent commit (c09f46c) fixed this. Can you give it a try now?

@Khrysller
Copy link
Author

Thanks, you give this a test, tomorrow in the office.

@Khrysller
Copy link
Author

Ok now it is acting even weird:

  • I have a select without the multiple option. But when I check the option, the selected text option do not shows in the select when closed. But it submits.
  • Now if I press back in the browser the selects are reseted.

@caseyjhol
Copy link
Member

Can you include some screenshots? I can't recreate this on my end (Windows 8.1, Chrome 43).

@Khrysller
Copy link
Author

I was testing on W7 with IE9. Gonna generate a reduced test case and run it with chrome, ie and firefox on W7

@Khrysller
Copy link
Author

This is still happening in the last dist. I am using W7 and IE9 or last Chrome. How to reproduce:

  • Have a page with some selects
  • Submit a form
  • Press back in browser
  • The values in the selects get reseted even in the selects with 'selected' pre-defined

@DarkMerge
Copy link

@Khrysller did you solve this problem? I have page with a lot of modal windows, every modal is a form with selectbox. After submitting and press back, html code of is correct. But plugin dont work right.

@Khrysller
Copy link
Author

I am closing this for now. Thanks.

@adamvoss
Copy link

If it is indeed the same bug: here is a public site where the issue is easily reproducible: https://index.scala-lang.org/akka/akka/akka-actor

The relevant select is on the right-hand side:
image

Steps to reproduce:

  1. Got to https://index.scala-lang.org/akka/akka/akka-actor
  2. Choose "akka-camel" from the selection box.
  3. Note that Statistics, Dependencies, and Dependents sections change (right-hand side)
  4. Press Back in the browser
  5. Notice that Statistics, Dependencies, and Dependents change back but the selection box still says "akka-camel."

I was using Firefox for when confirming the above.

@caseyjhol
Copy link
Member

I'm able to recreate this, specifically for standard select elements that have the title (placeholder) attribute set. My recreation is more similar to the one described in #1296. The placeholder option is added to the select and automatically selected instead of the default selected value.

@caseyjhol caseyjhol changed the title option changes when press back in browser if title/placeholder enabled, option changes when pressing back in browser May 2, 2020
caseyjhol added a commit that referenced this issue May 6, 2020
@caseyjhol caseyjhol changed the title if title/placeholder enabled, option changes when pressing back in browser if title/placeholder enabled, select value changes when pressing back in browser May 7, 2020
@caseyjhol
Copy link
Member

Released in v1.13.17!

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

4 participants