Skip to content

Commit

Permalink
Prevent window form changed popup
Browse files Browse the repository at this point in the history
Use a custom trigger on load instead of `change` to prevent popup notice. #93
  • Loading branch information
JoryHogeveen committed Jun 27, 2018
1 parent 34f6c6e commit 7724e22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions 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.0
* @version 1.8.1
* @preserve
*/
/* eslint-enable no-extra-semi */
Expand Down Expand Up @@ -209,7 +209,7 @@ if ( 'undefined' === typeof VAA_View_Admin_As ) {
}
}
$this.hide();
$target.on( 'change', function() {
$target.on( 'change vaa-change', function() {

if ( checkbox && $target.is(':checked') ) {
if ( compare ) {
Expand All @@ -225,7 +225,7 @@ if ( 'undefined' === typeof VAA_View_Admin_As ) {

VAA_View_Admin_As.autoMaxHeight();

} ).trigger('change'); // Trigger on load.
} ).trigger('vaa-change'); // Trigger on load.
} );

// @since 1.7.0 Init mobile fixes.
Expand Down
Loading

0 comments on commit 7724e22

Please sign in to comment.