Review Request 109036: Make sure the input component gets the focus

Aleix Pol Gonzalez aleixpol at gmail.com
Wed Feb 20 01:05:06 UTC 2013



> On Feb. 19, 2013, 2:29 a.m., David Edmundson wrote:
> > chat/org.kde.ktp-chat/contents/ui/ChatWidget.qml, line 27
> > <http://git.reviewboard.kde.org/r/109036/diff/1/?file=114393#file114393line27>
> >
> >     Change this to FocusScope
> >     and then you can delete the onFocusChanged line.
> >     
> >     and I think that's more 'correct' in terms QML.
> >     
> >     http://doc.qt.digia.com/4.7-snapshot/qdeclarativefocus.html#qmlfocus
> >     
> >     (that's completely untested BTW... if you want I'll test it tomorrow)
> 
> Aleix Pol Gonzalez wrote:
>     I tried with this: http://paste.opensuse.org/17952675
>     
>     And this wouldn't work, I don't know how it's supposed to be used, I guess... and documentation sucks
> 
> David Edmundson wrote:
>     That patch won't work; you now have two (or more) FocusScopes with focus:true at once, which isn't any difference from having the original two input boxes requesting focus at once. QML just randomly picks something. As I understand it all a focus scope does is say "ignore the children requesting focus until I get focus then work it out" (and you're right, the documentation does suck).
>     
>     So it needs combining with part of this patch here. This seems to work: http://paste.kde.org/676418
>     Opened two chats, input box always got focus on opening.
>

And how does having the FocusScope make a difference? You could set the focus to true without making it a FocusScope.


- Aleix


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109036/#review27701
-----------------------------------------------------------


On Feb. 19, 2013, 2:15 a.m., Aleix Pol Gonzalez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109036/
> -----------------------------------------------------------
> 
> (Updated Feb. 19, 2013, 2:15 a.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Description
> -------
> 
> When the popup is displayed, automatically set the focus to the text field.
> 
> 
> Diffs
> -----
> 
>   chat/org.kde.ktp-chat/contents/ui/ConversationDelegate.qml e17e925 
>   chat/org.kde.ktp-chat/contents/ui/ChatWidget.qml 2d13dba 
> 
> Diff: http://git.reviewboard.kde.org/r/109036/diff/
> 
> 
> Testing
> -------
> 
> Works wonderfully awesome on my panel's chat plasmoid :)
> (and plasmoidviewer)
> 
> 
> Thanks,
> 
> Aleix Pol Gonzalez
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20130220/c2ffed64/attachment.html>


More information about the KDE-Telepathy mailing list