Flyout and keyboard RRS feed

  • Question

  • In my app I have an appbar with many actions. Some of them causes a confirmation Flyout be shown, eg. 'Are you sure, you want to do this action?' message + 'do it' button. Or 'enter some text' textBox + 'do it' button. Just like in SkyDrive when you want to remove a file.

    What is the best way to apply this 'confirmation flyout' on enter click? When user clicks enter I wish it behaves the same as he taps the 'do it' button. In C# and XAML I would probably use sth like 'default button', but what is the proper way to cause 'do it' button's click method be called?

    Thursday, June 6, 2013 9:42 PM

All replies

  • Could sb please help me with this?

    I have analyzed the problem a little and tried to do it on my own, but I have new issues:

    I have added element.addEventListener("keyup", ...) for all of my Flyout's controls (buttons, textboxes). What I now want to do is to check whether the pressed key is an 'Enter' key. And then call the same method which is called when user taps 'Ok' button.

    The problem is, that keyup is catched on all keys, but not on 'enter' hit. Whenever I hit enter, it's catched by <button> which is placed on my currently displayed page. Can I turn off catching 'enter' by this button? I think this would solve my problem.

    Thanks for your time,


    Monday, June 10, 2013 8:13 AM