Choices icon indicating copy to clipboard operation
Choices copied to clipboard

Assigned options duplicate upon reload in FireFox

Open jspin opened this issue 5 years ago • 2 comments

Options assigned to a text input will duplicate when reloading the page in current rev FireFox

Steps to reproduce the behavior:

  1. Go to https://joshuajohnson.co.uk/Choices/ with FireFox
  2. Observe the single option in the field labeled "Email addresses only"
  3. Click reload button or Ctrl-r
  4. There are now 2 options in that field with the same value. Subsequent reloads continue to add more duplicates.

*** Note that Ctrl-Shift-r (hard reload) does not exhibit this behavior

Expected behavior Assigned options remain the same after reload

Tested on Linux with FireFox 72.0.1 and OSX with FireFox 72.0.2

Bug does not happen on Chrome (both Linux and OSX) nor Safari

jspin avatar Jan 24 '20 08:01 jspin

Maybe it's related to firefox's autocomplete functionality to preserve the values when reloading. I didn't tested it with Choices.js but I think autocomplete="off" on the input might help.

mynameisbogdan avatar Jan 29 '20 13:01 mynameisbogdan

The issue exists in Firefox on windows 10 too. But setting autocomplete="off" solves the problem.

Thanks @mynameisbogdan

FarhanShares avatar Jul 25 '20 14:07 FarhanShares