[solved] preloader cannot be closed immediately


#1

If you open a preloader and then close immediately, it then cannot be closed.
https://jsfiddle.net/qdechochen/80nf31wr/

Here I open a preloader before an ajax request, and after get the data, close it. This cause problem when the request is very fast. Right now I have to do a setTimeout before close the preloader.


#2

yes i also want to know about this anyone ?
with regards
https://notepad.software/ https://vidmate.onl/download/
https://filezilla.software/


#3

All modals are show within requestAnimation frame so you can use .nextFrame() util to hide it:
https://jsfiddle.net/85c9L3db/

this.$f7.dialog.preloader('canot hide sometimes');
this.$f7.utils.nextFrame(() => {
  this.$f7.dialog.close();
})

#4

That works perfectly. thanks @nolimits4web