Inspector goes blank when start downloading a file
Categories
(DevTools :: Inspector, defect, P3)
Tracking
(firefox52 unaffected, firefox53 fix-optional, firefox54 fix-optional)
Tracking | Status | |
---|---|---|
firefox52 | --- | unaffected |
firefox53 | --- | fix-optional |
firefox54 | --- | fix-optional |
People
(Reporter: 684sigma, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: regression)
Attachments
(1 file)
179 bytes,
text/html
|
Details |
Updated•8 years ago
|
Updated•8 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
It seems this issue reported two years back and not resolved yet on both of my Firefox - Quantum 64.0.2 (64-bit) and Developer Edition 66.0b2 (64-bit) . It will be nice if we get a fix for this problem.
Comment 10•6 years ago
|
||
str |
STR
- Open this test.
- Open the Inspector.
- Click the link.
Actual
The markup view goes blank.
Expected
The markup view does not go blank.
Comment 11•6 years ago
•
|
||
@bz Sorry to bug you!
In DevTools we use a nsIWebProgress listener to detect new pageloads (onDOMContentLoaded etc. are all way too late):
webProgress.addProgressListener(this,
Ci.nsIWebProgress.NOTIFY_STATE_WINDOW |
Ci.nsIWebProgress.NOTIFY_STATE_DOCUMENT);
The onStateChange
handler is here:
https://searchfox.org/mozilla-central/source/devtools/server/actors/targets/browsing-context.js#1628
The problem is that if we have a download link e.g. <a href="image.png" download="">
and somebody clicks on it then this is picked up by the web progress listener and we tear down the markup view ready to set it up for the new document.
How can we detect from within onStateChange()
that this is a download so that we can ignore the event?
Comment 12•6 years ago
|
||
Sorry for the lag here... I'm not sure how this fell through the cracks.
So it sounds like right now the devtools code is listening STATE_START|STATE_IS_DOCUMENT or something? That gets fired when we first send a request to the server.
We don't know whether it's a download or not until we receive a response from the server. The server may respond with a MIME type we don't know how to handle, or with "Content-disposition: attachment", and those would be downloads. Or the server can respond with a cross-origin redirect and that will not be a download, even if the "download" attribute is present. Or the server can respond with an HTTP 204 and that will be neither a download nor a navigation.
Presumably what you really want to know is "we're about to navigate away from this document" and switch to a different document, which will happen after we get the server response.
Does the pagehide event do what you want? If not, why not?
We should be able to make use of the pagehide event for this.
Updated•2 years ago
|
Comment 15•2 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 6 duplicates.
:jdescottes, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Description
•