qutebrowser/tests/end2end/data/hints/input.html
Florian Bruhin 1e1ba34b60 Fix selecting text fields with QtWebKit
Using focus() in JS there means that existing text in the field gets selected.
Move the cursor to the end after focusing it to prevent that.

Fixes #2359
2017-03-01 17:13:02 +01:00

25 lines
804 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Simple input</title>
<script type="text/javascript">
function setup_event_listener() {
var elem = document.getElementById('qute-input-existing');
console.log(elem);
elem.addEventListener('input', function() {
console.log("contents: " + elem.value);
});
}
</script>
</head>
<body onload="setup_event_listener()">
<form><input id="qute-input"></input></form>
With padding:
<form><input type="text" style="padding-left: 20px;"></input></form>
With existing text (logs to JS)::
<form><input id="qute-input-existing" value="existing"></input></form>
</body>
</html>