LadybirdBrowser / ladybird

Truly independent web browser
https://ladybird.org
BSD 2-Clause "Simplified" License
19.73k stars 812 forks source link

LibWeb/HTML: incorrect behavior on select() #1446

Open mobounya opened 3 days ago

mobounya commented 3 days ago

when calling select() on an input element it only works for the first time, clicking somewhere else and calling select() again does not work unless you change the text on the element.

incorrect behavior on Ladybird Ubuntu: ladybird

correct behavior on google chrome: chrome

HTML code:

<script>
    let mySelect = () => {
        let foo = document.getElementById("foo");
        foo.select();
    }
</script>

<input type="text" id="foo"/>
<button style="padding: 15px" id="button" onclick="mySelect()">Select</button>
ronak69 commented 3 days ago

Notice how prior to typing, the box is not vertically centerd with respect to the button box.

Also, tabbing more than two times (focus going past the button) freezes the app?

mobounya commented 2 days ago

yes both points are true, I guess they should be two more separate issues ?