mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +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
16 lines
313 B
HTML
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>
|