gecko-dev/editor/reftests/selection_visibility_after_reframe-2.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

13 lines
219 B
HTML

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