Skip to content

fix: update page title in inactive browser tabs#2383

Merged
meteyou merged 1 commit intomainsail-crew:developfrom
meteyou:fix/title-update
Jan 11, 2026
Merged

fix: update page title in inactive browser tabs#2383
meteyou merged 1 commit intomainsail-crew:developfrom
meteyou:fix/title-update

Conversation

@meteyou
Copy link
Member

@meteyou meteyou commented Jan 6, 2026

Description

This PR fixes the page title not updating in inactive browser tabs (especially in Firefox). The issue was caused by vue-meta not receiving reactivity updates when the browser throttles JavaScript execution in background tabs.
The fix removes vue-meta entirely and replaces it with a direct document.title assignment via a Vue @Watch decorator. This approach is consistent with how the favicon is already updated and works reliably in inactive tabs.

Changes:

  • Remove vue-meta dependency from package.json
  • Remove vue-meta import and plugin registration from main.ts
  • Replace metaInfo() method with a @Watch('title') that sets document.title directly in App.vue

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

No visual changes - this fix affects the browser tab title behavior only.

[optional] Are there any post-deployment tasks we need to perform?

None

Signed-off-by: Stefan Dej <meteyou@gmail.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where browser tab titles fail to update when the tab is inactive, particularly in Firefox. The root cause is that vue-meta doesn't receive reactivity updates when browsers throttle JavaScript execution in background tabs. The solution removes vue-meta entirely and implements direct document.title manipulation via a Vue @Watch decorator, matching the existing pattern used for favicon updates.

Key Changes:

  • Removed vue-meta dependency and its registration
  • Replaced metaInfo() method with @Watch('title') decorator that directly sets document.title
  • Simplified the title getter to a single computed property

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
package.json Removed vue-meta dependency
package-lock.json Removed vue-meta package and updated deepmerge to dev-only (still used by rollup)
src/main.ts Removed vue-meta import and plugin registration
src/App.vue Replaced metaInfo() with @Watch('title') for direct document.title assignment, removed Component.registerHooks call

@meteyou meteyou added this to the v2.17.0 milestone Jan 7, 2026
@meteyou meteyou merged commit ce65508 into mainsail-crew:develop Jan 11, 2026
12 checks passed
@meteyou meteyou deleted the fix/title-update branch January 11, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Percentage complete does not update if tab is unfocused

3 participants