Can't reliably add new lines in the HTML Editor
Categories
(DevTools :: Inspector, defect, P2)
Tracking
(firefox-esr140 unaffected, firefox149 wontfix, firefox150 wontfix, firefox151 wontfix, firefox152 wontfix, firefox153 fixed)
People
(Reporter: nchevobbe, Assigned: jdescottes)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
Steps to reproduce
- Navigate to
data:text/html,<meta charset=utf8><h1>Hello - Inspect the
Helloelement - In the markup view, Right click on the
<h1>node to edit the html - One the editor is displayed, hit Enter
Expected results
I get a new line at the top of the editor
Actual results
Nothing happens
It used to work in cm5
Comment 1•2 months ago
|
||
Set release status flags based on info from the regressing bug 1991431
:bomsy, since you are the author of the regressor, bug 1991431, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Updated•2 months ago
|
| Assignee | ||
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•1 month ago
|
| Assignee | ||
Comment 2•1 month ago
|
||
Hi Bomsy,
This is a relatively recent regression set as P2, do you have the bandwidth to take a look or should we go ahead?
| Assignee | ||
Comment 4•1 month ago
|
||
Taking a look at this one.
| Assignee | ||
Comment 5•1 month ago
|
||
The root cause of the issue is that codemirror6 adds BR elements which don't seem to play nicely with the xhtml document of the markup view.
Specifically this is coming from document.createElement("BR"), which creates <BR> elements which are not recognized in XHTML.
And in general all the node name comparisons in the bundle which use hardcoded uppercase tag names will fail.
It seems like CM6 doesn't intend to support XHTML according to https://discuss.codemirror.net/t/codemirror-6-embedded-in-xhtml/3165/4
I can see a few paths here, not sure which one makes the most sense:
- wrap CM6 in an iframe when used in the inspector. Should be relatively easy, this is mostly about using
appendToinstead ofappendToLocalElement, but I'm not sure if this might break some features? - monkeypatch cm6 to at least fix the node names to be lowercase. Fixes this issue, but adds recurring maintenance burden and potentially doesn't address all XHTML/CM6 issues
- migrate inspector/markupview from XHTML to HTML. Potentially the most expensive solution.
| Assignee | ||
Comment 6•1 month ago
|
||
| Assignee | ||
Comment 7•1 month ago
|
||
| Assignee | ||
Comment 8•1 month ago
|
||
I'm uploading patches for the iframe and XHTML -> HTML approaches, let's see what try says for those. We can try monkeypatching if both strategies fail.
| Assignee | ||
Updated•1 month ago
|
Updated•29 days ago
|
Updated•28 days ago
|
Comment 10•28 days ago
|
||
| bugherder | ||
Comment 11•28 days ago
|
||
Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 12•28 days ago
|
||
Moving 152 to wontfix, I prefer to let this bake on nightly as much as possible.
Updated•6 days ago
|
Description
•