#62374 closed defect (bug) (fixed)
Missing state properties and negation operator behave differently client/server
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.7.1 | Priority: | normal |
| Severity: | normal | Version: | 6.5 |
| Component: | Interactivity API | Keywords: | has-patch commit has-unit-tests |
| Focuses: | Cc: |
Description
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.
Change History (11)
This ticket was mentioned in PR #7755 on WordPress/wordpress-develop by @jonsurrell.
13 months ago
#1
- Keywords has-patch added
@cbravobernal commented on PR #7755:
13 months ago
#6
Commited with https://core.trac.wordpress.org/changeset/59398
#7
@
13 months ago
- Keywords dev-feedback added
- Resolution fixed deleted
- Status changed from closed to reopened
Reporting for 2nd committer review and sign-off for backporting https://core.trac.wordpress.org/changeset/59398 to the 6.7 branch.
@cbravobernal commented on PR #7755:
13 months ago
#9
Backported to 6.7 with https://core.trac.wordpress.org/changeset/59404
Note: See
TracTickets for help on using
tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/62374
---
The client side implementation allows negation to happen when state is missing.
The server side implementation skipped a possible negation when state is missing.