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
- ajaxurl not defined on front end
- How to post data to same page in wordpress
- Understanding WordPress functions’ naming conventions
- jQuery in header or footer
- Allowing for multiple template views on the Gallery Settings page when using the Visual Editor
- Add content to widget title in admin area within the widget?
- Has anyone managed to integrate the wp_editor inside a widget?
- Using Primary Color in Plugin Block
- Show a user their recently viewed posts
- When is it appropriate to put functions on page template vs. functions.php?
- Add new user and add meta at once
- Multiple entries in get_option results? or why is _multiwidget set to 1?
- How to Display Custom Post Type’s Gallery (images ) in Through WP_Query
- Using Ajax call in jQuery doesn’t work in widget
- Created Widget Not Showing up on Admin Panel
- What’s the better way to add an inline script?
- Is there a need to do apply_filter(‘widget_title’, $instance[‘title’]) or any other ‘widget_xxx’ filters?
- Metabox Not Showing on Custom Post Type But On Pages and Post
- Dynamic content in a widget
- Modify the Additional CSS section (adding a disclaimer)
- Backslashes being stripped from CSS
- Filter, or any way to dynamically change theme screenshot image?
- How to integrate plugin in WordPress theme
- Finding the paragraphs in content
- Order properties should not be accessed directly
- How to avoid loading same script twice?
- WP_Query returns no results
- Finding posts containing matching array elements in a meta field usign WP_Query
- Should action callbacks start with a verb?
- Executing a function upon webhook calling wordpress
- Is It Always a Best Practice to Decouple the Frontend from the Admin Area When Developing a WordPress Application?
- Beginner advice
- How to render a time-of-day string like ’16:42′ with a site’s chosen time format?
- Are block templates incompatible with serialize_blocks?
- ServerSideRender and Media Object: attributes passing image data object to php renderer even though it’s not set
- How to use a hook to override an update_post_meta call in a plugin?
- Form doesnt save to database
- Notice: Trying to get property ‘term_id’ of non-object
- Selectively update themes in WordPress multisite
- Enqueue script globally
- Can’t change the style of a submit input type? [closed]
- Plugin: database creation
- Loading Modernizr (or other JavaScript libraries) for use in a plugin
- Issue on Setting $icon_url Parameter on WP add_menu_page()
- Are there any official or unofficial guidelines for the styling of a widget?
- Ajax: Populate with content from a post’s ID not working – duplicating current page html instead
- Logout after clicking URL link results in “headers already sent” error
- My WordPress Plugin code breaks customize.php viewpoint
- Remove/Hide a Widget on a Custom Template
- How to show comments from different Plugins to same post type?
- Where to save Gutenberg plugin data?
- Add function to Dokan ajax class
- How do I make two shortcode use the same id and increment it when I use them multiple times?
- How to CRUD from wordpress database in wordpress theme?
- Caption Shortcode: what filter to change the image size?
- Best strategy for providing theme options using customizer
- Detect each active instance of a widget
- Issue on Getting WP Gallery Items In cpt-single.php As Attachments
- Adding Meta box to thrid-party plugin
- Best practice to include custom user styles in widgets
- WordPress Beginer to Guru [duplicate]
- Invalid Menu Items
- How to customize password reset message page on success if no error in password reset