Bug 313565 - Edit box for new tag name in SLC closes when keyboard is pressed
Summary: Edit box for new tag name in SLC closes when keyboard is pressed
Status: RESOLVED FIXED
Alias: None
Product: Active
Classification: Plasma
Component: Share Like Connect (show other bugs)
Version: Master
Platform: Unlisted Binaries Linux
: NOR major
Target Milestone: PA 4
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-20 14:48 UTC by Thomas Pfeiffer
Modified: 2013-03-29 20:38 UTC (History)
2 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 Thomas Pfeiffer 2013-01-20 14:48:37 UTC
When I tap Connect -> Tags -> New Tag, a box for the tag name opens. When I tap it, the keyboard pops up correctly. However, as soon as I start typing, the box disappears.

Reproducible: Always

Steps to Reproduce:
1. Open/select a taggable object
2. Tap "Connect"
3. Tap "Tags"
4. Tap "New Tag"
5. Tap the edit box
6. Tap a key on the keyboard
Actual Results:  
The box closes

Expected Results:  
The box stays open and text can be entered

Happens on basyskom-plasma-active-wetab-exopc-tablet-mer-devel-130118-2016 with updates from 2013-01-20
Comment 1 Marco Martin 2013-01-21 15:59:43 UTC
here the problem is the following:

the SLC window is an x11 window of type "popup": they close when the user clicks anywhere outside them, *and* are not counted as "currently focused window" even when they have keyboard focus.

so, clicking on the keyboard makes it close.
It's quite a structural problem, not really easy to solve, because we *really* need a window of type popup because we need:
* the slc window not being the "current" window or the slc info gets lost
* have keyboard focus
* close when tap away
* except when the tap is done over the keyboard
Comment 2 Thomas Pfeiffer 2013-01-21 18:09:57 UTC
Oh, that is quite  structural problem indeed :(
We definitely need a solution if we want to have a future-proof SLC, as I am pretty sure that there will be more SLC plugins that need text input in the future (for example "Share on [socialnetwork]" might need a field for entering accompanying text.
If there is not way to do this correctly with the current infrastructure, we'll need to disable the "New Tag" feature (assigning existing tags would still work) until we have an infrastructure supporting this.
Comment 3 Aaron J. Seigo 2013-01-21 19:17:54 UTC
indeed, what is needed is the keyboard not to trigger the hiding .. 

i would suggest trying an unmanaged window for SLC that isn't a popup type and doing the hiding ourselves in the code (i did that in the past elsewhere for specific cases in plasma desktop) but it is a nightmare and inevitably it creates other edge cases.

Martin might know of a trick in kwin that would allow the keyboard window to be always ignored for these purposes. CC'ing him in case he does :)
Comment 4 Martin Flöser 2013-01-21 20:33:50 UTC
I need to look at it myself, will install the latest devel image on my wetab and see what i get from X11.

But from reading through that it won't be an easy fix. It's the general problem that keyboard is considered as a window and by that interacts with other windows. From playing with extenders on desktop we need to fix the window properties of the keyboard (dock should work).
Comment 5 Marco Martin 2013-01-24 17:30:58 UTC
hmm, docks as well are not interagible when a popup opens...

a part of the problem is that while the slc window has to have focus for its text edit, at the same time must not have focus, at least should not be considered the "current window" otherwise the slc popup will steal slc itself from the app that is using it now (because wouldn't be the "current window" anymore)

a window of "popup" type works pretty much as expected, except that makes impossible to interact with any other window of any type, in this case the keyboard
Comment 6 Martin Flöser 2013-01-24 17:58:55 UTC
still I think the solution is to get the virtual keyboard integrated in a way that it doesn't interact with other windows. As written I need to experiment with it, but in general I think the virtual keyboard needs to be a special workspace service the window manager knows about.
Comment 7 Thomas Pfeiffer 2013-03-28 14:38:44 UTC
Decision: Remove the feature in PA4 and reintroduce once we can get it working properly.
Comment 8 Marco Martin 2013-03-28 20:24:05 UTC
Git commit 4343ecfd2ede655a7a08ac3903fc1296366f74e8 by Marco Martin.
Committed on 28/03/2013 at 21:22.
Pushed by mart into branch 'master'.

temporarly disable "New Tag"

unfortunate workaround for the impossibility of using an on screen keyboard with popup window types

M  +3    -2    dataengine/providers/tags/tagsProvider.cpp

http://commits.kde.org/share-like-connect/4343ecfd2ede655a7a08ac3903fc1296366f74e8
Comment 9 Thomas Pfeiffer 2013-03-29 20:38:11 UTC
"New Tag" menu item is gone, workaround successful :)