зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1132768 - Consider non-editable regions in contenteditable elements as user-select:all even if the editable region doesn't have the focus; r=roc
This commit is contained in:
Родитель
eb0dfd7978
Коммит
2f1041889b
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<script>
|
||||
function test() {
|
||||
getSelection().selectAllChildren(document.querySelector("span"));
|
||||
}
|
||||
</script>
|
||||
<body onload="test()">
|
||||
<div>foo<span>bar</span>baz</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<script src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script>
|
||||
function test() {
|
||||
synthesizeMouseAtCenter(document.querySelector("span"), {});
|
||||
}
|
||||
function focused() {
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
</script>
|
||||
<body onload="setTimeout(test, 0)">
|
||||
<div contenteditable spellcheck="false" onfocus="focused()"
|
||||
style="outline: none">foo<span contenteditable=false>bar</span>baz</div>
|
||||
</body>
|
||||
</html>
|
|
@ -70,6 +70,8 @@ support-files =
|
|||
bug1123067-2.html
|
||||
bug1123067-3.html
|
||||
bug1123067-ref.html
|
||||
bug1132768-1.html
|
||||
bug1132768-1-ref.html
|
||||
selection-utils.js
|
||||
multi-range-user-select.html
|
||||
multi-range-user-select-ref.html
|
||||
|
|
|
@ -152,6 +152,7 @@ var tests = [
|
|||
// [ 'bug1123067-1.html' , 'bug1123067-ref.html' ] , TODO: bug 1129205
|
||||
[ 'bug1123067-2.html' , 'bug1123067-ref.html' ] ,
|
||||
[ 'bug1123067-3.html' , 'bug1123067-ref.html' ] ,
|
||||
[ 'bug1132768-1.html' , 'bug1132768-1-ref.html'] ,
|
||||
function() {SpecialPowers.pushPrefEnv({'clear': [['touchcaret.enabled']]}, nextTest);} ,
|
||||
];
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
cursor: text;
|
||||
}
|
||||
|
||||
*|*:focus:-moz-read-write :-moz-read-only {
|
||||
*|*:-moz-read-write :-moz-read-only {
|
||||
-moz-user-select: all !important;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче