https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36774

--- Comment #31 from Pedro Amorim <[email protected]> ---
(In reply to Pedro Amorim from comment #18)
> Created attachment 166305 [details] [review]
> Bug 36774: (QA Follow-up): Use flatpickr clear
> 
> Im not sure why, but with the way it was before, there was a bug in my test
> plan.
> If you cleared using the TEST link, and then input some date and clear with
> the 'x', a JS error would occurr.

I now know why, flatpickr().clear() is re-adding the 2nd input and triggering
onReady but because onReady was returning early it was not re-wrapping the
flatpickr_wrapper, causing this error.

In hindsight, I don't think we should be adding this clear button on onReady
but use wrap from flatpickr instead:
https://flatpickr.js.org/examples/#flatpickr-external-elements
But I've invested enough time here and this is too much work for little gain.

Joubu, David, apologies for the back and forth here, this turned out to be a
much deeper rabbit hole than I thought. I've added cypress tests (more tests on
the claims page and patron hold tab could be added though) and went through the
test plans in bug 34263 and bug 36804 again to make sure everything is working
as expected, I believe it is.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to