Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There's already code in ModerationStateForm to do this, but it appears buggy. If the form's initial state is that "make default" is checked but "published" is not, the form will preload with make-default checked but then uncheck it in Javascript immediately. This appears to be a core bug.
As soon as the core bug is identified and fixed we should uncomment the code in question.
Comments
Comment #2
becw CreditAttribution: becw at Palantir.net for Acquia commentedThis may be related to #994360: #states cannot check/uncheck checkboxes elements.
Comment #3
Crell CreditAttribution: Crell at Palantir.net commentedMarking postponed on that core bug.
Comment #4
jibranNow after #2469713: Step 2: Create a JavaScriptTestBase using PhantomJs Driver/Binary we can add tests for this as well.