This bug is not present in Firefox 52.0 (beta).
<script>
document.addEventListener("selectionchange", function() {
const selection = getSelection();
console.log("Selection changed!");
});
</script>
<input autofocus>
Steps:
1. out/Debug/content_shell -u http://logikbyran.se/editing/2.html
2. Click outside of the <input>-field.
Actual: Two selectionchange events.
Expected: One selectionchange event.
Bug discovered during https://codereview.chromium.org/2616623002 .
Comment 1 by bugdroid1@chromium.org
, Mar 28 2017