mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
d50878a182
This patch ensures that the NODE_IS_EDITABLE flag is only set on nodes living under an editing host. Things like text controls which used to have that flag previously will not have it any more. The flag would be set on their anonymous div node instead. Note that if text controls actually fall under an editing host, they will get the NODE_IS_EDITABLE flag. This patch also makes nsHTMLEditor::IsEditable return sane results (text nodes are always considered to be editable).
30 lines
559 B
HTML
30 lines
559 B
HTML
<!DOCTYPE html>
|
|
<html class="reftest-wait">
|
|
<head>
|
|
<script>
|
|
|
|
function boom()
|
|
{
|
|
var div = document.querySelector("div");
|
|
div.contentEditable = "true";
|
|
div.focus();
|
|
|
|
var r = document.documentElement;
|
|
document["removeChild"](r);
|
|
document["appendChild"](r);
|
|
|
|
setTimeout(function() {
|
|
getSelection().collapse(div, 0);
|
|
document.execCommand("inserthtml", false, "a");
|
|
setTimeout(function() {
|
|
document.documentElement.removeAttribute("class");
|
|
}, 0);
|
|
}, 0);
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
|
|
<body onload="boom();"><div></div></body>
|
|
</html>
|