Bug 182353 - Inline rename: Cannot use context menu because right-clicking also exits rename mode
Summary: Inline rename: Cannot use context menu because right-clicking also exits rena...
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords: reproducible
: 238328 241080 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-29 22:35 UTC by dillonco
Modified: 2011-01-21 21:45 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.6.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dillonco 2009-01-29 22:35:10 UTC
Version:            (using KDE 4.2.0)
OS:                Linux
Installed from:    Gentoo Packages

When one is renaming a file inline, the text box doesn't seem to handle all events correctly.  In particular:

Ctrl+A selects all files in the current directory rather than all text.

Right click opens the text box context menu, but exits rename mode.

In addition, the the context menu contains other actions that don't seems to work (e.g. F3 for Spell Check).  Whether or not things like spell check, find and replace, etc. are useful for a file name, I don't know.  However, those options do not appear in the rename dialog, so perhaps there is just some general funkiness with with the inline box...
Comment 1 Frank Reininghaus 2009-01-30 17:50:39 UTC
Thanks for the bug report! In general, you should file only one problem per bug report. However, the Ctrl-A issue has already been reported, see bug 179932, and should be fixed in KDE 4.2.1 when it's out.

So only the remaining issue is that right-clicking opens a context menu which can't be used properly because Dolphin leaves rename mode at the same time.
Comment 2 Dotan Cohen 2009-05-27 09:10:19 UTC
> Ctrl+A selects all files in the current directory rather
> than all text.

Cannot reproduce in KDE 4.2.3

> Right click opens the text box context menu, but exits
> rename mode.

Cannot reproduce in KDE 4.2.3

> In addition, the the context menu contains other actions
> that don't seems to work (e.g. F3 for Spell Check).

All the actions shown seem relevant. Spell Check does not show for me, even though I think that would be relevant too!



As such, closing. Thanks.
Comment 3 Frank Reininghaus 2009-05-27 19:25:57 UTC
Dotan, are you sure you've enabled "Rename Inline" in the "General" section of the settings? The context menu issue is perfectly reproducible for me in 4.2.3 (Kubuntu) and trunk rev. 972778.
Comment 4 Dotan Cohen 2009-05-27 19:52:17 UTC
Sorry Frank, even though you were perfectly clear that the issue is for inline-rename only, I am so used to my ways that I did not even notice that my popup rename was not relevant. I was too quick with the trigger on this one.

> Ctrl+A selects all files in the current directory rather
> than all text.

This one I really cannot reproduce, it seems fixed (As per bug 179932).

> Right click opens the text box context menu, but exits
> rename mode.

Reproducable in KDE 4.2.3.

> In addition, the the context menu contains other actions
> that don't seems to work (e.g. F3 for Spell Check).

The context menu shown is identical to the context menu shown in Konqueror text fields, though the actions (copy, spell check) certainly do not work. In fact, when selecting an action the folder itself is selected and even though I am no longer holding down the mouse button, the cursor is dragging the folder.
Comment 5 Frank Reininghaus 2010-05-26 16:16:59 UTC
*** Bug 238328 has been marked as a duplicate of this bug. ***
Comment 6 Frank Reininghaus 2010-06-08 11:15:58 UTC
*** Bug 241080 has been marked as a duplicate of this bug. ***
Comment 7 Wulf Bolte 2010-08-23 15:03:35 UTC
I'm not sure if its the same bug, but if you push F2 to copy a text, push enter to exit the rename field Alt+Tab away and Alt+Tab Back, than everything works fine.

BUT

if you don't push Enter before Tabbing away, you cant use the Keyboard right away if you Tab back.
You than have to push several times tab, to continue your work.

One of the many areas where Keyboard navigation is inconsistent!
Comment 8 Frank Reininghaus 2010-10-06 00:11:00 UTC
@Wulf: your issue (which I can confirm in trunk) is probably a different bug. Could you file a new report for that? Thanks in advance.
Comment 9 2011-01-17 04:52:33 UTC
still dont get why this patch wasnt commited in trunk since it was done some time ago and this in fact fixes this bug:


Index: kfileitemdelegate.cpp
===================================================================
--- kio/kio/kfileitemdelegate.cpp	(revision 1128585)
+++ kio/kio/kfileitemdelegate.cpp.fix_copy_contents_with_rename_inline	(working copy)
@@ -1640,9 +1643,13 @@
 
     case QEvent::FocusOut:
     {
-        emit commitData(editor);
-        emit closeEditor(editor, NoHint);
-        return true;
+        const QWidget *w = QApplication::activePopupWidget();
+        if (!w || w->parent() != editor) {
+            emit commitData(editor);
+            emit closeEditor(editor, NoHint);
+            return true;
+        }
+        // Fallthrough intended
     }
 
     default:
Comment 10 Peter Penz 2011-01-17 06:53:14 UTC
@Zé: 
> still dont get why this patch wasnt commited in trunk since it was
> done some since it was done some time ago and this in fact fixes this bug:

Thanks, I'll check this week whether this patch works. However: Where was this patch posted for review? At least I was not aware that there is a patch at all...
Comment 11 Peter Penz 2011-01-21 21:45:11 UTC
SVN commit 1216194 by ppenz:

When editing the name of file items opening a context-menu for the text-editor may not result in closing the rename-operation. Thanks to Zé for the patch!

BUG: 182353
FIXED-IN: 4.6.1


 M  +6 -0      kfileitemdelegate.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1216194
Comment 12 Peter Penz 2011-01-21 21:45:34 UTC
SVN commit 1216195 by ppenz:

When editing the name of file items opening a context-menu for the text-editor may not result in closing the rename-operation. Thanks to Zé for the patch!

CCBUG: 182353


 M  +6 -0      kfileitemdelegate.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1216195