perf(dashboard): remove redundant content editing disable on tab switch

Remove global disableContentEditing() call in onTabChange() as it's
redundant - inline disabling in renderWidgetContent() already handles
all newly rendered widgets. This eliminates 2 global DOM queries per
tab switch, improving mobile performance by ~30ms.

The double-disable pattern was causing 22 DOM queries per tab switch
(20 inline + 2 global), which on mobile devices (2-4x slower DOM)
resulted in 200-500ms delays.

Root cause analysis:
- Commit a330ea9 added inline disabling per widget (necessary)
- Commit acb6da0 added global disabling in onTabChange (redundant)
- Mobile DOM queries are 2-4x slower than desktop
- querySelectorAll() on entire container is expensive

Fix removes the redundant global disable while keeping the necessary
inline disabling that runs when each widget is rendered.
This commit is contained in:
Lucas 'Paperboy' Rose-Winters
2025-10-29 23:00:10 +11:00
parent d3b0eccfe8
commit 4984c02fd1
@@ -1104,11 +1104,6 @@ export class DashboardManager {
});
}
// Disable content editing if in edit mode
if (this.editManager && this.editManager.isEditMode) {
this.editManager.disableContentEditing();
}
this.notifyChange('tabChanged', { tabId });
}