Description
Description
Description:
The Interactivity API shows a deprecation warning in WordPress 6.8 (Using the synchronous event.preventDefault() function in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 6.9. Please wrap the store action in withSyncEvent().)
even when:
The action is properly wrapped in withSyncEvent()
Following all documented best practices
The warning disappears when Gutenberg plugin is active
This contradicts the Interactivity API best practices post which states these warnings shouldn't appear in 6.8.
Step-by-step reproduction instructions
- Install fresh WordPress 6.8 (without Gutenberg plugin)
- Enable a block using Interactivity API navigation (like Query Loop with enhanced pagination)
- Open browser console
- Click on pagination links
- Observe deprecation warning
Expected Behavior:
-
No deprecation warnings should appear in WordPress 6.8 when:
-
Using withSyncEvent() properly
-
Following documented best practices
-
Consistent behavior between core and plugin versions
Actual Behavior:
-
Warning appears in WordPress 6.8 core
-
Warning disappears when Gutenberg plugin is active
-
Warning appears even in correct implementations
Screenshots, screen recording, code snippet
https://drive.google.com/file/d/1hnftbr0Xg8phYXNFHDis-A5giIbB5wT5/view?usp=sharing
Environment info
- Affected version: WordPress 6.8
- Components affected:
- Interactivity API runtime
- Router implementation
- Console warning:
Using the synchronous event.preventDefault() function in a store action without wrapping it in withSyncEvent() is deprecated and will stop working in WordPress 6.9. Please wrap the store action in withSyncEvent().
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure
Metadata
Metadata
Assignees
Labels
Type
Projects
Status