Open Bug 844401 Opened 11 years ago Updated 1 year ago

Meta refresh broken on pages with contenteditable elements

Categories

(Core :: DOM: Navigation, defect)

x86
Linux
defect

Tracking

()

Tracking Status
firefox-esr91 --- affected
firefox95 --- affected
firefox96 --- affected
firefox97 --- affected

People

(Reporter: kevin, Unassigned, NeedInfo)

References

Details

Attachments

(1 file)

Meta refreshes do not trigger on pages which contain at least one element with contenteditable="true" in the body.  I have attached an example page which demonstrates the issue.

I discovered the issue due to meta redirects not firing on imgur for albums when JavaScript is disabled (which uses the meta refresh in noscript in head hack).  For example, http://imgur.com/a/PzWtA should redirect to http://imgur.com/a/PzWtA/noscript when scripts are disabled.

I have confirmed that neither Chrome nor Opera have this behavior.  I have also confirmed this issue is present on Firefox 3.5.16, Firefox 19, and the current nightly (22.0a1 (2013-02-22)).  Given that it has been broken for so long without complaint, it's probably not a high-priority issue.
I believe the editor turns of meta refresh on the premise that editing a meta tag should not cause the page to refresh or something...
Is that behavior documented somewhere?  Also, in that case, perhaps it would make sense to only disable it in the case where the target of the refresh is the same page and the refresh time is > 0?
Now that I re-read your first comment, I'm not sure I interpreted it correctly.  Do you think it disables refresh to prevent losing edit changes due to refresh or to prevent triggering an unintended refresh as a result of editing due to how editing is implemented?
Attachment #717447 - Attachment mime type: text/plain → text/html
See Also: → 1747168
URL: 1234423
Severity: normal → --
Status: UNCONFIRMED → NEW
Ever confirmed: true

nsEditingSession::EndDocumentLoad and EndPageLoad both turn off meta refresh: see the calls to CancelRefreshURITimers() in https://searchfox.org/mozilla-central/rev/618f9970972adc5a21194d39d690ec0865f26024/editor/composer/nsEditingSession.cpp#863 and https://searchfox.org/mozilla-central/rev/618f9970972adc5a21194d39d690ec0865f26024/editor/composer/nsEditingSession.cpp#981. Ideally that wouldn't happen for at least contentEditable (and maybe also for designMode). I don't know if other users of the editor rely on meta refresh being disabled though.

Flags: needinfo?(masayuki)

Thank you, peterv! I'll check whether we can stop doing it completely (including comm-central).

Bringing this to webcompat priority triage - It'd be interesting to find out how this impacts web sites in the wild. I seemed to find nothing obviously related in https://webcompat.com/

Webcompat Priority: --- → ?

We do not know of any live websites affected by this issue.
So even if it's a real bug, it's not a webcompat priority. :)

Webcompat Priority: ? → ---
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: