Fix page publication fields not clearing when unchecking published checkbox#3737
Open
antwertinger wants to merge 1 commit intoAlchemyCMS:mainfrom
Open
Fix page publication fields not clearing when unchecking published checkbox#3737antwertinger wants to merge 1 commit intoAlchemyCMS:mainfrom
antwertinger wants to merge 1 commit intoAlchemyCMS:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3737 +/- ##
=======================================
Coverage 97.47% 97.47%
=======================================
Files 314 314
Lines 8303 8303
=======================================
Hits 8093 8093
Misses 210 210 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f4be71c to
43ce4ac
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this pull request for?
When unchecking the "published" checkbox on a page that already has a public_on date set, the page remained published after saving. The root cause was that the code set input.value = "" directly on the raw element, which flatpickr ignores — it uses its own internal state for form submission.
Fix: query the web component instead of the raw input and call flatpickr.clear() to correctly reset both the DOM value and flatpickr's internal state.
Notable changes (remove if none)
Checklist