Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ContentDialog collapses when soft keyboard is open on wp8.1, preventing users from entering text input. #1149

Closed
naf456 opened this issue May 15, 2015 · 2 comments

Comments

@naf456
Copy link

naf456 commented May 15, 2015

I was trying to use a ContentDialog to aid a user to create a new document inside my app.
On windows phone 8.1 - when using a lumia 620 (small screen smart phone) - the content inside the ContentDialog is collapsed by the soft keyboard, making it impossible for users to enter any text input.
I have worked around this issue by using a flyout instead, although would rather continue to use a content dialog due to it's use of a background overlay and it's tidy centered appearance.

I have not tried any other mobile devices yet.

thank you.

@mikewjackson
Copy link

Hi @natf456,

Can you please attach a photo/screenshot of the issue?

-Michael

@mikewjackson mikewjackson modified the milestones: 1506, 1505 May 27, 2015
@rigdern
Copy link
Contributor

rigdern commented May 28, 2015

@naf456 Can you provide a page/app which repros this bug? You can share it using OneDrive as described on our wiki.

@mikewjackson mikewjackson modified the milestones: 1507, 1506 Jun 26, 2015
rigdern pushed a commit that referenced this issue Aug 15, 2015
Fixes #1149 and #910

When the input pane shows, the ContentDialog's response was to maintain
its top/left position and to shrink its height as much as needed to avoid
being occluded by the input pane. This behavior resulted in a bug where,
if the dialog's top/left was close to the center of the screen, the dialog
could become very short when it resized to get out of the way of the input
pane (#1149).

To fix this, the new way the ContentDialog responds to the input pane is:
  - If the dialog will not be occluded by the input pane, then the dialog
    maintains its current size and position.
  - If the dialog will be occluded by the input pane, the dialog lays
    itself out using its normal layout rules but it does so in the
    unoccluded portion of the window (visible document) rather than in the
    whole window.

There was another bug (#910) where the ContentDialog would become
horizontally off center if the window was resized while the input pane was
showing. This is now fixed because the ContentDialog uses its normal
layout rules even when the input pane is showing.

Other changes:
  - Switiched from .focus() to .scrollIntoView() for keeping the focused
    element in view while resizing the dialog to get out of the input
    pane's way. The motivation for this change was that calling .focus()
    on document.activeElement no longer causes the element to scroll into
    view in Edge.
  - When the ContentDialog is shown, put focus on the root element of the
    dialog rather than on the first focusable element within the dialog's
    content area. The motivation for this change is that .scrollIntoView()
    is more aggressive about scrolling than .focus() was -- it scrolls the
    element to the top of its scroller even if that element was already in
    view. This results in a poor experience when showing the dialog and
    the first focusable element in the content area is a textfield -- the
    user will never have the chance to see the content at the top of the
    dialog because the dialog would immediately scroll it off screen.
    Order of events:
      - Dialog shows and puts focus on the first focusable element
        (assume it's a textfield) in the content area
      - Input pane shows
      - Dialog resizes
      - Dialog calls .scrollIntView() on the textfield to keep it in view
	during the resize thus scrolling the dialog's topmost content off
	the screen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants