Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

End Date auto-saves sometimes only #274

Closed
caseywatts opened this issue Nov 11, 2012 · 4 comments
Closed

End Date auto-saves sometimes only #274

caseywatts opened this issue Nov 11, 2012 · 4 comments

Comments

@caseywatts
Copy link
Collaborator

Auto-save process:

  1. change the end date
  2. navigate away
  3. observe: the end date is the same! If it fails, it is reset to what it was before your last change.

It does auto-save on the Catalog page
It does not auto-save on the equipment_models show page
Haven't tested other pages

@caseywatts
Copy link
Collaborator Author

Oop and the use-case:
I was trying to see how many laptops were available over a 3-week range instead of just the 2-day default range.
(which, for STC should always be the same, but I was checking anyway)

@dgoerger
Copy link
Contributor

If I'm not mistaken, this is a consequence of the JS callback function
we're using to auto-save the cartdates, which if I'm remembering correctly
is.. the modern equivalent of on.blur()? In any case, it's something we
played around with over the summer, after we 86'd the manual "Update Carts"
button. We hadn't been able to get on.change() to work correctly with our
Datepicker implementation, as I believe it was trying to submit the subform
to the controller "before" the clicked-on date had actually been entered
into the form by Datepicker.

(This suspicion hinges on an identical behavior which showed up this summer
when one changed the End Date but then did not click elsewhere on the page
before navigating away. On.blur() checks for when the element [i.e., the
input field] loses focus from the mouse / keyboard, so does not update
dates if the input field never loses focus.)

A more elegant JS solution would still be worth investigating, though.
shrug

@orenyk orenyk mentioned this issue Apr 29, 2014
2 tasks
@squidgetx
Copy link
Contributor

Is this basically the cart latency issue again? (Trying to go through some of the older issues and close any that are duplicate/irrelevant)

@orenyk
Copy link
Contributor

orenyk commented Jun 9, 2014

Sounds like, merging into #523. Good catch!

@orenyk orenyk closed this as completed Jun 9, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants