Skip to content

Commit

Permalink
Fix event bubbling for select options.
Browse files Browse the repository at this point in the history
Fixes #130
  • Loading branch information
JoryHogeveen committed Oct 19, 2023
1 parent 61888a0 commit 8294072
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion assets/js/view-admin-as.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Jory Hogeveen <info@keraweb.nl>
* @package View_Admin_As
* @since 0.1.0
* @version 1.8.5
* @version 1.8.9
* @preserve
*/
/* eslint-enable no-extra-semi */
Expand Down Expand Up @@ -118,6 +118,14 @@ if ( 'undefined' === typeof VAA_View_Admin_As ) {
VAA_View_Admin_As.init_module_role_manager();
VAA_View_Admin_As.init_auto_js();

/**
* @since 1.8.9 Fix event bubbling for select options.
* @see https://github.com/JoryHogeveen/view-admin-as/issues/130
*/
$vaa.find( 'select' ).on( 'mouseleave', function( e ) {
e.stopPropagation();
} );

// Toggle content with title.
$vaa.find( '.ab-vaa-toggle' ).each( function() {
var $this = $( this ),
Expand Down
Loading

0 comments on commit 8294072

Please sign in to comment.