maemo.org Bugzilla – Full Text Bug Listing
|Summary:||When chat overlay extends, text entry should gain focus|
|Product:||[Extras] Miniature||Reporter:||Michael Hasselmann <michael>|
|Component:||UI||Assignee:||Uwe Kaminski <jukey>|
|Status:||CLOSED FIXED||QA Contact:||general|
|Attachments:||90% Implementation of "gain focus" functionality if chat extends (works only with special requirements)|
SOFTWARE VERSION: 0.3 (N950) EXACT STEPS LEADING TO PROBLEM: 1. Open chess board, 2. Tap on chat area. EXPECTED OUTCOME: Text entry should be focused and virtual keyboard should come up (if required). ACTUAL OUTCOME: Nothing, user needs to focus manually.
Agreed, although we need to see this working in a real chat. Many taps might come only because the user wants to read more, not type. If that is the case then the keyboard eats chat area. But why not, there is still plenty left. In any case the change is simple and it looks like a good task for a new contributor.
Created an attachment (id=3409) [details] 90% Implementation of "gain focus" functionality if chat extends (works only with special requirements) This patch contains the attribute (Is this the correct word?) "focus: true" which is enabled if the chat area extends. The problem: Steps to reproduce: 1. Run Miniature and enter a game 2. Tap onto the Chat area --> Chat area expands but chatField is getting no focus 3. Tap into the chatField Outcome: Nothing happens - this is a big issue! 4. Tap and hold into the chatField ...keep your finger touched on the screen 5. Swipe a little bit up and down your finger Outcome: The chatField is getting focus and will appear as expected between step 3. and 4. 6. Tap into the chat area above the input field --> The extended chat area dissapears 7. Tap onto the small chat area as done in step 2 Outcome: Chat area expands but chatField _is getting focus_ Now you can repeat step 6. to 7. as often as you want. Every time gain focus works as expected. Does somebody have an idea what's wrong? :) PS: the second line of this patch: placeholderText: "Enter text to chat" is unreleated but usful to show what the chatField is for.
Looking at the documentation for TextField, "focus" doesn't appear in the list of properties of the element or inherited. It seems that the right way to do this is applying this method: TextField::openSoftwareInputPanel () Opens software input panels like virtual keyboards for typing, useful for customizing when you want the input keyboard to be shown and hidden in your application. Maybe useful if that alone doesn't work: TextField::forceActiveFocus () Force active focus on the item. This method sets focus on the item and makes sure that all the focus scopes higher in the object hierarchy are also given focus.
Works as expected.