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
- Objective Best Practices for Plugin Development? [closed]
- How to get the path to the current theme?
- How to create an API for my plugin?
- Plugins in symlinked directories?
- How to use PanelColorSettings in custom Gutenberg block?
- What is an alternative method to the WordPress private _doing_it_wrong() function
- Update exisiting site to 3.5 release candidate
- add_filter and remove_filter added before and after wp_query
- What is the difference between strip_tags and wp_filter_nohtml_kses?
- Having Problem On Getting WP Post Gallery Images URL
- Script to remove all inactive widgets?
- How to bundle a plugin with a theme, or vice versa
- Using $wpdb object in a widget
- Modify a Free Plugin available on wordpress.org & include with my Premium Theme? [closed]
- Best choice of options/settings framework for plugin/theme development
- Display content from custom post without modifying the single template
- Applying OO patterns and principles to plugin development
- Add more then one site logo – custom-logo theme support
- Is it possible to change a term slug before being saved to the database?
- Short code not working in boostrap modal dont no why?
- Is there a way to list all actions registered by a plugin or theme?
- How can I turn a custom wordpress page into a product page?
- Best practices regarding the creation of custom widgets?
- 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?
- PowerPress mobile media player
- When is the proper time to minify css and js with git workflow?
- Get draggable widgets on Edit Post page
- Is it possible to visually group items on the theme customizer?
- Warning: include(): https:// wrapper is disabled in the server configuration by allow_url_include=0
- Customizer – loading settings/controls/sections/panels based on a id/page id
- Make a plugin page out of influence of the theme’s style
- 400 Bad Request, in wordpress theme development, wp_ajax
- Is there a WordPress boolean for “theme_customizer_active()”?
- Converting core modification to a plugin
- add shortcode support in customizer
- Save temporary registration data
- How to show multiple instances of the WP125 Widget?
- How can the_excerpt (or equivalent) be called on a category description?
- Serial Number from custom table not appear in woocommerce_email_before_order_table action
- Change the behaviour of a button
- Configuring Xdebug with docker compose
- How to access index file in Block Themes?
- How to create a custom post-new.php page for plugin , no wp menu
- Redirection from a specific page for users logged in but not with membership
- Save meta box data from selected dropdown list in bbpress reply form
- Load script on frontend from widget plugin
- Can’t get wpColorPicker to work in a widget
- Replace “content-area” of themes 404 page with plugin?
- Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?
- Create Customization panel for Plugins not for theme
- Widget won’t be activated
- Font Awesome stopped showing icons, shows &# text instead [closed]
- Customizer API way function is_customize_preview() works only in main page?
- Generate activation url
- trying to figure out how to use more that one image upload in the same section in theme customizer
- Client Profiles
- How do I create Widget within plugin that uses its own class?
- Saving multiple fields as array
- How to add image for custom taxonomy
- Gutenberg text field validation
- How to get the value entered in the input field in wordpres
- Why isn’t custom sidebar panel not showing up in the Gutenberg Editor?