Plugin Directory

Changeset 2870986


Ignore:
Timestamp:
02/25/2023 12:50:03 PM (3 years ago)
Author:
bilaltas
Message:

Unsaved warning bug fix

Location:
custom-codes/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • custom-codes/trunk/assets/script/script.js

    r2812418 r2870986  
    578578                            if (parseInt(customCodesData.playSound)) codes_audioElement.play();
    579579
     580                            // Allow changing window
     581                            $(window).off( 'beforeunload.edit-post' );
     582
    580583                        } else {
    581584                            console.log('Something went wrong.', customCodes.errors);
     
    608611                e.preventDefault();
    609612
    610             } else window.onbeforeunload = null; // Allow changing window
     613            } else $(window).off( 'beforeunload.edit-post' ); // Allow changing window
    611614
    612615        });
     
    640643            customCodes.currentTitleTag = newTitle.length ? newTitle : "Untitled Code";
    641644
    642             if (initialPostTitle == newTitle) window.onbeforeunload = null; // Allow changing window
     645            if (initialPostTitle == newTitle) $(window).off( 'beforeunload.edit-post' ); // Allow changing window
    643646
    644647        });
     
    656659
    657660            // Allow changing window if AJAX is not available
    658             if (!$('#ajax-saver').length) window.onbeforeunload = null;
     661            if (!$('#ajax-saver').length) $(window).off( 'beforeunload.edit-post' ); // Allow changing window
    659662
    660663            // Click the save button
  • custom-codes/trunk/readme.txt

    r2870967 r2870986  
    143143
    144144== Changelog ==
    145 = 2.3.4 (2023-02-25 14:45 EET) =
     145= 2.3.4 (2023-02-25 15:42 EET) =
    146146* Tested on WordPress 6.2
    147147* Custom login URLs detection improvements
     148* Unsaved warning bug fix
    148149
    149150= 2.3.3 (2023-02-14 20:54 EET) =
Note: See TracChangeset for help on using the changeset viewer.