[wp-trac] [WordPress Trac] #62374: Interactivity API: Missing state properties and negation operator behave differently client/server
WordPress Trac
noreply at wordpress.org
Mon Nov 11 11:45:58 UTC 2024
#62374: Interactivity API: Missing state properties and negation operator behave
differently client/server
-------------------------------+-----------------------------
Reporter: jonsurrell | Owner: jonsurrell
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Interactivity API | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
With a directive like the following:
{{{
<div data-wp-bind--hidden="!state.missing.property">
This should be hidden by the <code>hidden</code> attribute.
</div>
}}}
The server will render the following HTML:
{{{
<div data-wp-bind--hidden="!state.missing.property">
This should be hidden by the <code>hidden</code> attribute.
</div>
}}}
But the client will immediately set the `hidden` attribute (the expected
behavior):
{{{
<div data-wp-bind--hidden="!state.missing.property" hidden="">
This should be hidden by the <code>hidden</code> attribute.
</div>
}}}
The client and server should align on the behavior of the negation
operator with directives to missing paths.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62374>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list