Bug 132142 - Focusing on text inputs with .focus() should move the cursor to the end.
Summary: Focusing on text inputs with .focus() should move the cursor to the end.
Status: RESOLVED UNMAINTAINED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (other bugs)
Version First Reported In: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-09 14:32 UTC by Tim Hutt
Modified: 2024-05-06 18:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Move cursor to end after the input field received focus (944 bytes, patch)
2007-02-10 12:20 UTC, Harri Porten
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Hutt 2006-08-09 14:32:18 UTC
Version:            (using KDE KDE 3.5.3)
Installed from:    Ubuntu Packages

Simple bug (probably almost wishlist), but when you so something like this:

<html>
<head>
	<script type="text/javascript">
		function select()
		{
			document.getElementById("query").focus();
			return false;
		}
	</script>
</head>

<body onload="select();">
	<form action="index.cgi" method="GET">
		<input type="text" id="query" name="query" value="Some initial text."/>
	</form>
</body>
</html>

Then the input cursor appears at the start of the text edit, when it should be at the end (most often you want to append text, not prepend it). Firefox does it correctly.

Just a slight annoyance - probably very easy to fix.
Comment 1 Harri Porten 2007-02-10 12:19:15 UTC
It is easy to fix (see patch). But do all other browser agree? The test in my (slightly dated) IE had a different result.
Comment 2 Harri Porten 2007-02-10 12:20:40 UTC
Created attachment 19603 [details]
Move cursor to end after the input field received focus
Comment 3 FiNeX 2010-09-19 15:55:43 UTC
The testcase is still valid with KDE 4.4.5.

The patch should be updated for KDE 4.
Comment 4 Justin Zobel 2021-03-21 00:26:00 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 10 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 5 Christoph Cullmann 2024-05-06 18:38:08 UTC
Dear user,

KHTML (and KJS) was a long time more or less unmaintained and got removed in KF6.

Please migrate to use a QWebEngine based HTML component.

We will do no further fixes or improvements to the KF5 branches of these components beside important security fixes.

For security issues, please see:

https://kde.org/info/security/

Sorry that we did not fix this issue during the life-time of KHTML.

Greetings
Christoph Cullmann