The reason for this is that the widget will run its update logic on keydown
and also on change
for a given input
element. See https://github.com/WordPress/wordpress-develop/blob/4.7.2/src/wp-admin/js/customize-widgets.js#L891-L907
There are some tradeoffs made when widgets were added to the customizer to bring these PHP-driven interfaces into a JS-driven context. It wasn’t perfect and so this is part of the reason behind the JS Widgets feature plugin, to modernize how custom widgets are implemented in the customizer.
If you want to really just listen for when a widget actually changes its state, you can listen for the control’s underlying setting
change instead. The setting will only be updated once after a given keydown
and subsequent change
event.
Related Posts:
- Dynamic sidebar areas not working on the Theme Customizer
- How can I configure Docker for developing and deploying a custom theme?
- Is There A Hook To Process The Content Of The Text Widget?
- Custom theme sufficient or custom plugin neccessary for this feature set?
- How to create custom home page via plugin?
- Featured Image not showing in admin
- Customizer Not Saving Options
- How Can I setup WP CLI on Windows development machine running AMPPS?
- WP_LOCALIZE_SCRIPT doesn’t work
- Are we allowed to use the Allman (BSD) indent style when coding WordPress plugins and themes?
- Can I individually style items in the backend widget list?
- WordPress not working on localhost
- “Add A Widget” button in the Customizer
- How to limit number of number of categories displayed by categories widget
- Custom entity search and display
- Why in this archive page that call query_posts() function show only the last 10 posts?
- Create Widget or Enable Shortcodes in Sidebar
- How to use a WP_Customize_Control outside of the Customizer?
- How to replace settings in WordPress plugin from a theme
- How to remove/replace current page template?
- WordPress dynamic widget by location?
- Setting a post’s category
- Impossible to declare box-shadow with wp.customize?
- Want to know how to reveal a WordPress theme, considering the theme name is hidden?
- Metabox types list
- Rate limiting ajax requests in WordPress
- Set widget icon in Customizer?
- Determine if the current page, is being edited
- How to embed or integrated a custom WordPress Widget into the theme?
- Post Pagination does not working on WP-Query
- Managing Custom Designed Content
- Best practice: What belongs in theme and what in plugin for large eCommerce website
- Adding class to the parent of current-post-ancestor / current-menu-parent / current-post-parent
- grouping my widgets wordpress
- Is Explicit Versioning a better alternative to Semantic Versioning for wordpress?
- Is there any other ways to replicating changes on live from staging without pushing from git
- Capture the Selected Radio Button Value between two files in wordpress theme
- Sticky bar with filter button and product count
- Add a class to a dynamic sidebar’s wrapper
- Is there an event or an other method that tells me the preview is loaded?
- Is it possible to change a term slug before being saved to the database?
- SQL query for custom taxonomy slugs
- Tried in different ways but sidebar not working?
- Can Page Templates be Applied to Archive and Post Templates?
- Widget is to be compatible with all themes
- Maximum lifetime for nonce
- Clearing caches on plugin uninstall
- How to use a hook to override an update_post_meta call in a plugin?
- Add code inside specific wordpress standard function
- Short code not working in boostrap modal dont no why?
- Custom Taxonomy to dropdown box on adminside wordpress
- Create a free scripts and styles template within a plugin
- Is there a way to list all actions registered by a plugin or theme?
- Howto: Use Custom Post Types as Submenu Items in Admin
- Customizer: Unique identifier that distinguishes which image upload control is uploading an image
- Is there some way to provide the user a list of existing content in a CPT
- Change the look and feel of admin pages
- How to modify the comments to be displayed in a post?
- Extending theme PHP class in plugin
- How to access noticeOperations from withNotices
- How to hook a custom user function to a wordpress core ajax action?
- How can I turn a custom wordpress page into a product page?
- Elementor custom Query with ACF fields to show matching woocommerce products custom fields
- WP Gutenberg Blocks – How to limit first/root blocks
- How do I change the markup only of a built-in widget?
- How to get boolean value from register_meta properly?
- Best practices regarding the creation of custom widgets?
- what is the difference between these phares?
- How can we display product price $104 on the cart while the credit card payment method is checked?
- Form doesnt save to database
- Notice: Trying to get property ‘term_id’ of non-object
- Incorporate small angular feature in my wordpress site
- What is the proper method of using global $post?
- How developed with version control word press site on shared host? [closed]
- How to Bind one post object Type with other postobject Type in Advanced Custom field [closed]
- Customizer: active_callback and sanitize_callback incompatibility?
- Disabling Customizer Selective Refresh shortcut icons for selected controls
- JavaScript stops working on selectively refreshed sections one inside the other
- How to export post meta with images in wordpress
- Password field is empty when using wp_signon();
- How to change title tag at page after loaded post?
- Following WordPress Markup Is mandatory, got awkward resultyby wordpress standard markup?
- Widget Dropdown doesn’t working
- Customizer: save setting/control content to post/page
- Q: How to pull data from custom table to populate zustomizer setting/control select options
- How do I create plugin or theme using MVC pattern?
- How do I get the sub categories of the parent when in a sub category?
- Search: how to extend the existing search to include a custom table
- Is there documentation reference for forms in menu and setting pages?
- PowerPress mobile media player
- Input in plugin widget does not allow spaces
- When is the proper time to minify css and js with git workflow?
- Get draggable widgets on Edit Post page
- Strange Situation When Try To Retrieve Github Gist Using wp_remote_get
- How to hide or rename “X” and “x-child” references in website source?
- WordPress custom taxonomy check box to dropdown
- How to Get Current Custom Post Type Associated Taxonomy Term
- Dynamically creating classes for Widget API
- Widget options are not updated
- Plugin templates vs Parent Theme