New issue
Advanced search Search tips

Issue 727986 link

Starred by 1 user

Issue metadata

Status: Duplicate
Owner: ----
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Updating document.title does not update the title for the URL in Chome's history entry

Reported by daniel.a...@gmail.com, May 31 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Steps to reproduce the problem:
1. Use document.title = 'New Title' on a page to update the title
2. Notice the title changes in the tab.
3. Check browser history, title is still set to the original title.

What is the expected behavior?
Title would update in the history entry to the modified title.

What went wrong?
The history title is not being updated unless setting document.title follows a call to window.history.replaceState/pushState.

A workaround seems to be to invoke a window.history function immediately before setting the title.
window.history.replaceState(null, '')
document.title = 'My Modified Title';

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 58.0.3029.110  Channel: stable
OS Version: OS X 10.12.3
Flash Version:
 
test.html
241 bytes View Download
Cc: mmanchala@chromium.org
Components: UI>Browser>History
Labels: M-61 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Windows-7,Windows-10,Mac-10.12.4 and Linux Ubuntu-14.04 using chrome stable version 58.0.3029.110 and canary 61.0.3115.0 with the steps mentioned in comment#0.

This is Non-Regression issue, observed from M30 #30.0.1549.0 and marking it as Untriaged to get more inputs from dev team.

Thanks
Mergedinto: 44140
Status: Duplicate (was: Untriaged)

Sign in to add a comment