Skip to content

Commit f174c88

Browse files
committed
Saving Icon Fix
1 parent 7719901 commit f174c88

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Components/Topbar.wlx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ Component[OptionsPattern[]] := With[{
215215
let timer;
216216

217217
this.on('Saving', async (data) => {
218+
if (timer) return;
219+
218220
timer = setTimeout(() => {
219221
spinner = document.createElementNS("http://www.w3.org/2000/svg", "svg");
220222
spinner.setAttribute('class', "ml-auto mr-auto w-4 h-4 text-gray-200 animate-spin dark:text-gray-600 fill-teal-600");
@@ -230,6 +232,8 @@ Component[OptionsPattern[]] := With[{
230232
});
231233

232234
this.on('Saved', async (data) => {
235+
if (api) api?.blockWindow(false);
236+
233237
if (timer) {
234238
clearTimeout(timer);
235239
timer = undefined;
@@ -239,9 +243,7 @@ Component[OptionsPattern[]] := With[{
239243
spinner.remove();
240244
spinner = undefined;
241245
saveBtn.firstChild.classList.remove('hidden');
242-
saveBtn.disabled = false;
243-
244-
if (api) api?.blockWindow(false);
246+
saveBtn.disabled = false;
245247
});
246248

247249
this.on('WSRequest', () => {

0 commit comments

Comments
 (0)