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)
Tracking
(status1.9.2 .2-fixed, fennec1.0a4-wm+)
VERIFIED
FIXED
People
(Reporter: blassey, Assigned: alexp)
References
Details
(Keywords: mobile)
Attachments
(1 file)
|
6.19 KB,
patch
|
blassey
:
review+
|
Details | Diff | Splinter Review |
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
Comment 1•16 years ago
|
||
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
| Reporter | ||
Comment 2•16 years ago
|
||
given that resizes are expensive, I think we'd rather pan to get the text field to the top.
Comment 3•16 years ago
|
||
resizes aren't that expensive after we optimized them, a pan is most over the resize overhead.
Comment 4•16 years ago
|
||
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.
| Reporter | ||
Comment 5•16 years ago
|
||
Gavin, I think this might be part of your viewport work. If not, assign it back to me.
Assignee: nobody → gavin.sharp
| Reporter | ||
Updated•16 years ago
|
tracking-fennec: --- → 1.0b1-wm+
| Reporter | ||
Comment 7•16 years ago
|
||
Gavin, any update on this?
Comment 8•16 years ago
|
||
(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.
Updated•16 years ago
|
Assignee: gavin.sharp → nobody
| Assignee | ||
Updated•16 years ago
|
Assignee: nobody → alexp
| Assignee | ||
Comment 9•16 years ago
|
||
The patch resolves this bug, improves situation with bug 527511, and also should help with other issues related to the soft-keyboard.
| Assignee | ||
Updated•16 years ago
|
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)
| Assignee | ||
Comment 10•16 years ago
|
||
Brad, could you try it on Omnia II please.
| Reporter | ||
Comment 11•16 years ago
|
||
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.
| Reporter | ||
Comment 12•16 years ago
|
||
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-
| Assignee | ||
Comment 13•16 years ago
|
||
(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.
| Reporter | ||
Updated•16 years ago
|
Attachment #418751 -
Flags: review- → review+
| Reporter | ||
Comment 14•16 years ago
|
||
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
| Reporter | ||
Updated•15 years ago
|
tracking-fennec: 1.0b1-wm+ → 1.0a4-wm+
| Reporter | ||
Updated•15 years ago
|
Attachment #418751 -
Flags: approval1.9.2.1?
| Reporter | ||
Comment 15•15 years ago
|
||
status1.9.2:
--- → .2-fixed
Comment 16•15 years ago
|
||
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
Updated•15 years ago
|
Attachment #418751 -
Flags: approval1.9.2.2?
You need to log in
before you can comment on or make changes to this bug.
Description
•