mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
04828e3a4a
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
13 lines
219 B
HTML
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>
|