none
[U8.1][Xaml]Textbox inside of FlipView prevents SIP keyboard from being dismissed RRS feed

  • Question

  • I am using a full-screen flipview to allow a background to rotate behind a set of inputs. if you tap the input textbox, the SIP keyboard appears; this is expected.

    however, tapping outside of the textbox does not dismiss the keyboard as expected. I finally realized it is because of the flipview. I verified this by adding a 250 margin around the flipview. if i tap in the area covered by the control it still doesn't dismiss, but if I tap the areas covered by the margins (that is, outside the flipview) the SIP does dismiss as expected.

    I tried setting IsTabStop to false and IsTapEnabled to false for the flipview, but the SIP still remains active unless i tap outside the flipview.

    since we need the flipview to be full screen, I need to know if there is a way to disable the focus behavior so that it closes the keyboard, while still allowing the user to flip by sliding the background...

    can this be done? which property or event on the flipview can I leverage to make this happen?



    Wednesday, June 3, 2015 12:20 AM

Answers

  • Since the point is to change the focus, setting the focus explicitly is much less of a hack than disabling and reenabling and hoping the focus goes somewhere useful to you.

    The FlipView isn't a text control, but it's probably not getting the focus when you tap on it (technically, you're probably not actually tapping on the FlipView, but on a FlipViewItem embedded in the FlipView). If you make it a tabstop you should be able to set focus to it explicitly.

    Monday, June 8, 2015 11:32 PM

All replies

  • aha, by handling the "tapped" event I did the old trick of disabling and enabling the flipview and sure enough the keyboard dismissed!
    Wednesday, June 3, 2015 12:33 AM
  • The Building Windows Store apps with C# or VB forum is retiring! I'll move this to the Building Universal Windows apps forum for you. Please read Welcome to the Developing Universal Windows apps forum! and Guide to posting: subject line tags

    Disabling and reenabling controls like this is a pretty ugly hack. You'll be better off deliberately setting the focus to a non-text control. Setting IsTabStop on the page often makes it a good focus parking target.

    Wednesday, June 3, 2015 10:55 PM
  • thanks for the input, but i think setting focus to a non-text control seems like a hack as well, as I'm unsure why the flipview would be considered a text control. if it isn't, it certainly isn't dismissing the keyboard when you tap on it.

    I did set istabstop=false on the page, but since the flipview in this case is full screen, attempting to tap the page canvas would effectively still be tapping the flipview, so it didn't do the trick...

    Wednesday, June 3, 2015 11:02 PM
  • Since the point is to change the focus, setting the focus explicitly is much less of a hack than disabling and reenabling and hoping the focus goes somewhere useful to you.

    The FlipView isn't a text control, but it's probably not getting the focus when you tap on it (technically, you're probably not actually tapping on the FlipView, but on a FlipViewItem embedded in the FlipView). If you make it a tabstop you should be able to set focus to it explicitly.

    Monday, June 8, 2015 11:32 PM