#53180: fix: preserve initial window title with forward/back navigation
Merged
Description of Change
Closes #53173
When I added #52089, I didn't handle a case where we create a window with a custom title. This creates a regression where updating the history state without any title changes still allows to update the title when pressing back/forward navigation buttons.
I added a regression test and the gist now passes: https://gist.github.com/nikwen/5234f4e74220620df24c54bf704a899a
Checklist
- I have built and tested this change
- I have filled out the PR description
- I have reviewed and verified the changes
-
npm testpasses - tests are changed or added
- relevant API documentation, tutorials, and examples are updated and follow the documentation style guide
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: Fixed a regression where a window created with a custom title can show an empty title after using back/forward navigation.
Backports
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron