Make v17.6.9 offer workspace rendering idempotent
This commit is contained in:
parent
02e891fea9
commit
e64dde78f0
@ -78,7 +78,7 @@
|
||||
if(!MODES.has(next))next='preview';mode=next;const m=modal();if(!m)return;
|
||||
m.dataset.offerWorkspaceMode=mode;
|
||||
document.querySelectorAll('#sunOfferWorkspaceTabsV1769 [data-offer-workspace-tab]').forEach(b=>b.classList.toggle('on',b.dataset.offerWorkspaceTab===mode));
|
||||
const edit=$('sunOfferEdit');if(edit){edit.textContent=mode==='editor'?'К просмотру':'Редактировать';edit.setAttribute('aria-pressed',mode==='editor'?'true':'false')}
|
||||
const edit=$('sunOfferEdit');if(edit){const label=mode==='editor'?'К просмотру':'Редактировать';if(edit.textContent!==label)edit.textContent=label;edit.setAttribute('aria-pressed',mode==='editor'?'true':'false')}
|
||||
if(focus){const target=mode==='editor'?$('sunOfferEditor'):mode==='templates'?$('sunOfferTemplateV1764'):m.querySelector('.sun-offer-frame-wrap');target?.scrollTo?.({top:0,behavior:'instant'});}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user