Ticket #5319 (new defect)

Opened 3 years ago

Last modified 9 months ago

Previous selected checkbox always updates on next submit

Reported by: rjollos Assigned to: hasienda
Priority: low Component: TracFormsPlugin
Severity: normal Keywords: needinfo checkbox update refresh wiki documentation
Cc: mkc Trac Release: 0.11

Description

I'm running the Laundry List example.

  1. I select WashClothes and submit - the timestamp for WashClothes updates.
  2. I unselect WashClothes and refresh the page - WashClothes is selected again. I repeat this step but each time I refresh the page it seems to remember that I selected WashClothes on the last submit and reselect the checkbox.
  3. I unselect WashClothes, select FoldClothes, and submit - the timestamp for both WashClothes and FoldClothes update.
  4. I select only WashClothes and submit again. The timestamp does not update.

Is this the expected behavior?

- Ryan

Attachments

Change History

06/04/09 12:36:46 changed by anonymous

I assume that refreshing the page means using the Reload-Button of the browser.
There might be an interference with the cache of the browser.
I'm using firefox and there holding the shift-key while clicking Reload re-fetches the
instead of taking it from the cache.

Assume a checkbox is enabled (meaning submitted, in trac's sql database).
When i disable it (without submitting) and reloading the page, the the checkbox stays disabled.
If i do a shift-reload the checkbox jumps back to enabled (as in trac's sql database).

Maybe this helps understanding the described behaviour.

06/07/09 15:05:31 changed by rjollos

On Firefox, I'm seeing the same behavior as you with regard to the checkbox and reload vs shift+reload.

That is, if I select and submit item A, then:

  • Unselecting item A and reloading the page, item A remains unselected.
  • Unselecting item A and shift+reloading the page, item A goes back to selected.

However, if I select and update item A, uncheck A, select and update item B; then both items A and B update.

06/09/09 06:50:32 changed by rjollos

  • summary changed from Behavior of LaundryList example to Previous selected checkbox always updates on next submit.

I'm changing the summary because I've been able to reproduce this behavior in multiple cases and it is definitely not specific to the Laundry List example.

06/09/09 07:20:19 changed by rjollos

I've tested this on Firefox and Opera and see the same behavior. In fact, after testing on Firefox, I moved over to Opera and observed that the third item in my list was selected on first navigating to the page. I unselected the item and selected the second item; both the second and third items updated on submit.

06/10/09 19:37:47 changed by anonymous

  • cc set to mkc.

08/04/09 03:14:36 changed by anonymous

  • priority changed from normal to high.

12/02/10 23:00:47 changed by rjollos

  • cc changed from mkc to mkc, hasienda.

12/05/10 01:10:46 changed by hasienda

  • cc changed from mkc, hasienda to mkc.
  • keywords set to checkbox update refresh wiki.
  • owner changed from rharkins to hasienda.

Thanks for all the testing done by now. Most probably I'll have to ask for more details about your test cases, but this need definitely to be fixed soon.

03/31/11 22:37:41 changed by hasienda

Coming back to your question now after much more code reading and testing.

As triggering a checkbox change is an on/off|1/0 value change, I think the observed behavior is the expected one. In fact what is implemented right now is a dumb bi-stable switch. Please discuss, if this is (or what else), what you want to happen.

I think, you're discussing more towards a trigger behavior with "self-resetting on commit" capability, or something else?

05/03/11 22:14:28 changed by hasienda

Another suggestion: Since 0.3 now has an extensive history review similar to ticket changes, you could just add the keep_history command in the form header, do some changes and look at what is going on in the history afterwards. In fact it should be almost self-explaining. Give it a try, please.

05/03/11 22:17:22 changed by hasienda

  • keywords changed from checkbox update refresh wiki to needinfo checkbox update refresh wiki documentation.

Still need to know, if there is something to fix. But by now I seriously doubt, it is code - documentation at most.

05/18/11 21:17:09 changed by hasienda

  • priority changed from high to low.

Step down priority since right now it seems like it should work this way. Comments?


Add/Change #5319 (Previous selected checkbox always updates on next submit)




Change Properties
Action