Closed
Bug 1322678
Opened 8 years ago
Closed 6 years ago
Title of image tab changes back to filename on user zoom
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: vincent.spallek, Assigned: edgar)
Details
(Keywords: reproducible, testcase)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0; Firefox 45.5.1 - 11712-1502020039-1.31 Build ID: 20161129180326 Steps to reproduce: Create a webpage that opens a huge image in a new tab with JavaScript and changes the title of that new tab after load. Initially, the new tab is shown with the custom title, and the image is zoomed to show the full image. If clicking on the image with the mouse, the image zooms to 100%. Actual results: In this moment, the tab's title is changed back to the filename of the image. If using CTRL + "+" or CTRL + "-" for zooming, then the title is not changed (as expected). Expected results: The tab's title shouldn't change.
Reporter | ||
Updated•8 years ago
|
OS: Unspecified → Windows 7
I see this problem in 45.5.1esr and Fx51b6, with the testcase and a local image file. But the custom title will be overwritten immediately if use image on web address. And the tab title will be overwritten every time the page zoom (not image zoom) level reaches 100%, including using the hotkey.
Severity: normal → minor
Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Keywords: reproducible,
testcase
OS: Windows 7 → Windows
Hardware: Unspecified → All
For local image file, add "newWin.addEventListener('resize', function() {" will fix the problem. But it seems useless to open web image.
Reporter | ||
Comment 3•8 years ago
|
||
Use case is if the underlying CMS is generating a really ugly long URL for an uploaded image, but we want to show the familiar filename to the user.
Reporter | ||
Comment 4•8 years ago
|
||
… otherwise, the tab title is completely useless to the user if several tabs are open.
In this case, using a page, iframe or AJAX element to display, or generate a short and pseudo-URL, may be a better way. Or, may the Content-Disposition:"inline; filename="jshang.png"" right for you? like https://bug1320571.bmoattachments.org/attachment.cgi?id=8816766.
Comment 6•7 years ago
|
||
Hi, The attachment from description is not working. YF based on the fact that you succeeded to reproduce this can you think to a component for this bug?
Flags: needinfo?(yfdyh000)
I've reproduced the reporter's problem, but I don't know if it's a problem with this example or a browser issue.
Flags: needinfo?(yfdyh000)
Product: Firefox → Core
Comment 8•7 years ago
|
||
This issue reproduces on other browsers?
Reporter | ||
Comment 9•7 years ago
|
||
I tried my example on IE and Chrome on Windows as well. Both browsers do not show this bug but show the expected behavior: the tab's title doesn't change back.
Comment 10•7 years ago
|
||
I opened the attached file and clicked on "Link" the result is "Object not found". How can I use the attached file? Thanks
Reporter | ||
Comment 11•7 years ago
|
||
The attached file is meant as documentation, please read its source code. To make it work, you need to change it to open an image with dimensions bigger than your screen.
Updated•7 years ago
|
Component: Untriaged → Tabbed Browser
Product: Core → Firefox
Comment 12•7 years ago
|
||
This is because of the implementation of https://dxr.mozilla.org/mozilla-central/source/dom/html/ImageDocument.cpp , which updates the title to include zoom factors etc. I guess it should be taught not to overwrite custom-set titles.
Component: Tabbed Browser → DOM
Product: Firefox → Core
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → echen
Flags: needinfo?(echen)
Assignee | ||
Comment 15•6 years ago
|
||
Assignee | ||
Comment 16•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&tier=1&revision=fc58e49a1e673c873407f786e78b4274468acfb7&group_state=expanded
Assignee | ||
Comment 17•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&tier=1&revision=fd8de2c8ce01f83e857af4a5d8afb2b07c3bf052&group_state=expanded
Assignee | ||
Comment 18•6 years ago
|
||
(In reply to Edgar Chen [:edgar] from comment #17) > https://treeherder.mozilla.org/#/ > jobs?repo=try&tier=1&revision=fd8de2c8ce01f83e857af4a5d8afb2b07c3bf052&group_ > state=expanded There are some failures that are actually not related to this change. Rebase and try again, https://treeherder.mozilla.org/#/jobs?repo=try&tier=1&group_state=expanded&revision=8154027e4ffce44797aaef7fa5ac7a57aeb5857a, it looks good now.
Comment 19•6 years ago
|
||
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6343e6061b9e Don't overwrite the custom-set title of ImageDocument; r=smaug
Comment 20•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6343e6061b9e
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Updated•5 years ago
|
QA Whiteboard: [good first verify]
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•