Skip to content

[Windows 11] Browser window automatically restores from minimized state when visiting Vue 3 SPA with vue-router #438

@LGX93

Description

@LGX93

‌Description:‌
On Windows 11, Microsoft Edge automatically restores the browser window from a minimized state immediately after the user minimizes it. This issue only occurs when visiting specific Single Page Applications (SPAs) built with Vue 3 and vue-router. The issue does not reproduce in Google Chrome or other Chromium-based browsers on the same machine.

‌Steps to Reproduce:‌

Open Microsoft Edge on Windows 11.
Navigate to a Vue 3 project using vue-router (e.g., [Insert Your Localhost URL or Demo Link here]).
Ensure the page loads completely.
Click the "Minimize" button on the browser window (or press Win + Down Arrow).
Observe the window behavior.
‌Expected Result:‌
The browser window should remain minimized in the taskbar until the user manually restores it.

‌Actual Result:‌
The browser window automatically pops up/restores to its previous size immediately after being minimized.

‌Environment:‌

‌OS:‌ Windows 11 (Version: [e.g., 22H2, Build 22621.xxx])
‌Browser:‌ Microsoft Edge ([e.g., Version 120.0.2210.91 (Official build) (64-bit)])
‌Framework:‌ Vue 3.x + vue-router [e.g., 4.3.0+]
‌Device:‌ [e.g., Desktop / Laptop Model]
‌Additional Context:‌

This issue seems related to how vue-router handles history.replaceState in conjunction with Edge's handling of the visibilitychange event.
Downgrading vue-router to version 4.2.5 resolves the issue, suggesting a compatibility regression in newer router versions or a specific behavior in Edge's history API implementation.
Attached is a screen recording demonstrating the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions