fix(archive): point getElementById at the real root id
drag-drop.js and the unsupported-browser handler in app.js both
referenced getElementById('app'), but the template's root has
id="appContainer". The mismatch was masked in production because
sourceMode='http' skips dragDrop.init() — only file:// (sourceMode=
'local') tripped over it, throwing "Cannot read properties of null
(reading 'addEventListener')" at app load.
Surfaced while header-standardizing the other tools; fixed by
pointing both callers at #appContainer.
This commit is contained in:
parent
22c142e45a
commit
c603eb6cdb
2 changed files with 5 additions and 3 deletions
|
|
@ -300,7 +300,7 @@
|
||||||
|
|
||||||
// Show unsupported browser message
|
// Show unsupported browser message
|
||||||
function showUnsupportedBrowserMessage() {
|
function showUnsupportedBrowserMessage() {
|
||||||
const app = document.getElementById('app');
|
const app = document.getElementById('appContainer');
|
||||||
app.innerHTML = `
|
app.innerHTML = `
|
||||||
<div class="empty-state">
|
<div class="empty-state">
|
||||||
<div class="empty-state-content">
|
<div class="empty-state-content">
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,10 @@
|
||||||
// Handle drops on grouping folders (for creating transmittals)
|
// Handle drops on grouping folders (for creating transmittals)
|
||||||
document.getElementById('groupingFoldersList').addEventListener('drop', handleDrop, false);
|
document.getElementById('groupingFoldersList').addEventListener('drop', handleDrop, false);
|
||||||
|
|
||||||
// Handle drops on the main app area (for adding directories)
|
// Handle drops on the main app area (for adding directories).
|
||||||
document.getElementById('app').addEventListener('drop', handleAppDrop, false);
|
// Note: the root element is id="appContainer" (id="app" was a
|
||||||
|
// stale reference that crashed dragDrop init in local mode).
|
||||||
|
document.getElementById('appContainer').addEventListener('drop', handleAppDrop, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent default behaviors
|
// Prevent default behaviors
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue