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

Flyout is hidden when typing button Alt #107

Open
h2qutc opened this issue Mar 7, 2017 · 1 comment
Open

Flyout is hidden when typing button Alt #107

h2qutc opened this issue Mar 7, 2017 · 1 comment

Comments

@h2qutc
Copy link

h2qutc commented Mar 7, 2017

Hi,
I had a flyout with some inputs (text, email). When I tried to tap button Alt or Alt Gr (french keyboard), the flyout is hidden immediately.
Any ideas ?

@rcbyrne
Copy link

rcbyrne commented Dec 21, 2017

Hello h2qutc,

I encountered the same issue using normal WinJS and fixed it by adding event.preventDefault() in function Flyout_handleKeyDown(){ ... } in the ui.js page.

_handleKeyDown: function Flyout_handleKeyDown(event) {
     if ((event.keyCode === Key.space || event.keyCode === Key.enter) 
     && (this === _Global.document.activeElement)) {
          event.preventDefault();
          event.stopPropagation();
          this.winControl.hide();
     } else if (event.shiftKey && event.keyCode === Key.tab
     && this === _Global.document.activeElement
     && !event.altKey && !event.ctrlKey && !event.metaKey) {
          event.preventDefault();
          event.stopPropagation();
          this.winControl._focusOnLastFocusableElementOrThis();
     
     //Add The Following
     } else if (event.keyCode === Key.alt) { 
          event.stopPropagation();
     }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants