Docs

Browser Tab Drag-and-Drop: Reload on Pane Split

Question

Is it possible to drag and drop browser tabs between panes without the webview reloading after the drop?

Answer

No — not without architectural changes. This is a fundamental Electron limitation.

When a pane split happens, pane-element.js moves the item’s DOM node from one .item-views container to another. A <webview> element that is detached from the DOM causes Electron to destroy the underlying OOPIF (Out-Of-Process iFrame) and its WebContents, so the page always reloads on reattach.

Options

Save/restore URL (minimal work) The view already serializes the URL via HTMLEditor.serialize(). You could hook into the pane move event to capture the full navigation state (URL and optionally history.state) before the detach, then navigate back to it after re-attach. The tab still reloads, but it returns to exactly the right page — it feels like a refresh rather than a blank-slate reset.

Switch to BrowserView (significant refactor) Electron’s BrowserView is positioned and sized by the main process and is not a DOM element. Repositioning it never reloads its contents. This is the standard solution in production Electron apps. The tradeoff is that BrowserView requires main-process coordination to keep its bounds in sync with pane position and size as the window resizes and panes are split/resized.