Workaround saving too fast before page fully loaded

Post Reply
Sergelie
Sr. Bludit
Posts: 32
Joined: Sun Feb 14, 2021 3:19 pm
Has thanked: 6 times
Been thanked: 4 times
Contact:

I had issues when I saved too fast a long post (before the page fully loaded), ending up with an empty post. Good thing I was using Time machine. I found a way to force a delay before I can save again - I use TinyMCE. I hope it will help the ones facing the same problem.

You must apply css display:none prior to using that script to #jsbuttonSave.

HTML plugin - ADMIN header:

Code: Select all

<style> 
#jsbuttonSave {display:none;}
</style>
HTML plugin - ADMIN footer:

Code: Select all

<script>
$(document).ready(function () {
$('#jsbuttonSave')
  .delay(4000)
  .queue(function (next) { 
    $('#jsbuttonSave').css('display', 'block'); 
    next(); 
  });
});
</script>
lightmat
Sr. Bludit
Posts: 46
Joined: Fri Feb 21, 2020 10:53 pm

Nice :)
Post Reply