Closed Bug 479444 Opened 16 years ago Closed 16 years ago

text fields are hidden by the software keyboard

Categories

(Firefox for Android Graveyard :: General, defect)

All
Windows CE
defect
Not set
normal

Tracking

(status1.9.2 .2-fixed, fennec1.0a4-wm+)

VERIFIED FIXED
Tracking Status
status1.9.2 --- .2-fixed
fennec 1.0a4-wm+ ---

People

(Reporter: blassey, Assigned: alexp)

References

Details

(Keywords: mobile)

Attachments

(1 file)

when a text field takes focus and is in the lower two thirds of the screen (variable based on screen size obviously) it is hidden by the software keyboard that pops up. This is a follow up from bug 747734
as in wince softkb does not resize the window but just apper on top of it, minimo used to do [1] to resize the window avoid that http://mxr.mozilla.org/mozilla1.8/source/minimo/components/softkb/nsSoftKeyBoard.cpp#457
given that resizes are expensive, I think we'd rather pan to get the text field to the top.
resizes aren't that expensive after we optimized them, a pan is most over the resize overhead.
The important part is whether we resize or not is to make sure viewingRect is updated to reflect the covered up area in WidgetStack(and canvasbrowser) so ensureElementIsVisible can do it's magic.
Gavin, I think this might be part of your viewport work. If not, assign it back to me.
Assignee: nobody → gavin.sharp
tracking-fennec: --- → 1.0b1-wm+
Gavin, any update on this?
(In reply to comment #7) > Gavin, any update on this? This is likely going to depend on the new tile cache code. We'll wait for it to land.
Assignee: gavin.sharp → nobody
Assignee: nobody → alexp
The patch resolves this bug, improves situation with bug 527511, and also should help with other issues related to the soft-keyboard.
Attachment #418751 - Attachment description: [Work in Progress] Resize main window when soft-keyboard shows or hides → Resize main window when soft-keyboard shows or hides
Attachment #418751 - Flags: review?(bugmail)
Brad, could you try it on Omnia II please.
I built with this patch and see two problems off that bat. First, on start up, we don't resize: http://people.mozilla.org/~blassey/wm-screenshots/not-resized.png with the exception of the first time the keyboard shows, we seem to behave (i.e. resize) as expected. However, on the Omnia II we aren't hiding the SIP or moving the keyboard correctly so the toolbar from the next app in the z order shows through: http://people.mozilla.org/~blassey/wm-screenshots/toolbar-showing-through.png That should be taken care of by bug 532929, but I wanted to point it out since we'll look pretty bad on the Omnia II if this lands before bug 532929 is fixed.
Comment on attachment 418751 [details] [diff] [review] Resize main window when soft-keyboard shows or hides >+ >+ if (wnd) { >+ HWND wndMain = nsWindow::GetTopLevelHWND(wnd); >+ RECT winRect; >+ ::GetWindowRect(wndMain, &winRect); >+ if (winRect.bottom != visRect->bottom) { >+ if (winRect.bottom < visRect->bottom && sShowSIPButton != TRI_TRUE) { >+ // Soft keyboard has been hidden, have to hide the SIP button as well This test and the comment don't seem to match up. if the window's bottom is below the visible rect's bottom then it would seem to imply that the softkb has been brought up, not hidden. >+ HWND hWndSIPB = FindWindowW(L"MS_SIPBUTTON", NULL ); >+ if (hWndSIPB) >+ ShowWindow(hWndSIPB, SW_HIDE); >+ } Up to now we've done the hiding of the SIP in ToggleSoftKB. Is there any reason to change that? >+ >+ winRect.bottom = visRect->bottom; >+ MoveWindow(wndMain, winRect.left, winRect.top, winRect.right - winRect.left, winRect.bottom - winRect.top, TRUE); >+ } >+ }
Attachment #418751 - Flags: review?(bugmail) → review-
(In reply to comment #12) > >+ if (winRect.bottom < visRect->bottom && sShowSIPButton != TRI_TRUE) { > >+ // Soft keyboard has been hidden, have to hide the SIP button as well > This test and the comment don't seem to match up. if the window's bottom is > below the visible rect's bottom then it would seem to imply that the softkb has > been brought up, not hidden. As the Y coordinate increases from the top to the bottom of the screen, the "if" condition means the new visible area bottom is below the current window bottom, i.e. the keyboard was hidden. > Up to now we've done the hiding of the SIP in ToggleSoftKB. Is there any > reason to change that? With the current implementation software keyboard could be hidden by the system and NotifySoftKbObservers could be called from nsWindow::ProcessMessage. In this case the SIP button stays visible. This happens for example with the emulator when you type on a hardware keyboard while software keyboard is visible. As soon as you start typing the screen keyboard hides. I'm not sure if this is still the case with any real device (we do check the hardware keyboard availability), but as there is another entry point to the function with a chance to have the SIP button visible at that moment, it is more safe to hide that button (if it's not enabled in the prefs of course). This might change with bug 516468 fixes, but first we have to make sure the optimized ToggleSoftKB works on different devices.
Attachment #418751 - Flags: review- → review+
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
tracking-fennec: 1.0b1-wm+ → 1.0a4-wm+
Attachment #418751 - Flags: approval1.9.2.1?
verified FIXED on build: Mozilla/5.0 (Windows; U; WindowsCE 5.2; en-US; rv:1.9.2.2pre) Gecko/20100208 Namoroka/3.6.2pre Fennec/1.0a4pre
Status: RESOLVED → VERIFIED
Attachment #418751 - Flags: approval1.9.2.2?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: