gecko-dev/editor/reftests/selection_visibility_after_reframe-3.html
Emilio Cobos Álvarez 04828e3a4a Bug 253870 - Make disabled form controls selectable. r=masayuki,MarcoZ
This rejiggers a bit the way selection focus is handled so that focusing a
disabled form control with the mouse handles selection properly, and hides the
document selection and so on.

This matches the behavior of other browsers as far as I can tell.

Given now readonly and disabled editors behave the same, we can simplify a bit
the surrounding editor code.

Differential Revision: https://phabricator.services.mozilla.com/D66464

--HG--
extra : moz-landing-system : lando
2020-03-19 13:18:16 +00:00

16 lines
313 B
HTML

<!DOCTYPE html>
<html>
<body>
<input value="foo">
<script>
var i = document.querySelector("input");
i.focus();
i.selectionStart = 1;
i.selectionEnd = 2;
i.style.display = "none";
document.body.clientHeight;
i.style.display = "";
</script>
</body>
</html>