Bug 167637 - Editing fields screws up cursor
Summary: Editing fields screws up cursor
Status: RESOLVED FIXED
Alias: None
Product: keditbookmarks
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 167855 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-29 03:58 UTC by Ben Boeckel
Modified: 2008-09-07 21:03 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Boeckel 2008-07-29 03:58:52 UTC
Version:            (using KDE 4.0.5)
Installed from:    Fedora RPMs

When editing the text fields in keditbookmark (keb), the cursor is set to the end of the field when the text is changed anywhere. I have run into similar problems in my own code and fixed it with the following:

const int cursor = varName->cursorPosition();
data->setName(name);
varName->setCursorPosition(cursor);

However, looking at the code (in SVN), it doesn't look like the behavior has changed at all and I'm not sure how to fix it with how the updating is structured. I think it should be piecemeal unless the bookmark is reverted (instead of applied) which would allow the fix above to work. Right now it feels like the GNOME instant-apply (Undo doesn't work either; I imagine due to the way the changes are handled). Also, having the clear button on the KLineEdit would be helpful, but that's a wishlist item ;) .
Comment 1 Dominik Tritscher 2008-07-30 16:27:14 UTC
This problem still exists in 4.1
After entering the first letter in the mittle of a lineedit sets the cursor to the end of the field.
Comment 2 Dominik Tritscher 2008-08-02 00:16:17 UTC
*** Bug 167855 has been marked as a duplicate of this bug. ***
Comment 3 AAW 2008-09-07 18:20:53 UTC
I'm seeing the same thing with Mandriva cooker rpm's (x86_64) as of 2008-09-07.
Comment 4 Urs Wolfer 2008-09-07 19:54:26 UTC
Adding Daniel to CC list, as I think he has done most work on KEditBookmarks in the last time.
Comment 5 Urs Wolfer 2008-09-07 21:03:30 UTC
SVN commit 858312 by uwolfer:

Fix several issues with editing a bookmark item:
* restore cursor position
* prevent emptied line if the currently entered url is invalid
* show clear buttons in editable lineedits

To bugreporters: Please review these fixes; I would like to backport them to the 4.1 branch if it fixes all issues.
BUG:167637

 M  +12 -8     bookmarkinfo.cpp
 M  +13 -5     commands.cpp