back button does not respond to click once it is retargeted to 8.1 RRS feed

  • Question

  • Back button does not respond to click however it responds to backspace. It works for earlier versions (win 8). But once I retageted it to windows 8.1. I tested my app without making any subsequent changes in the code and the back button does not function on click.


    Thursday, December 12, 2013 8:12 PM


All replies

  • There are changes to how hit testing works between Windows 8 and Windows 8.1. Make sure you go through Migrating Windows Store apps  to Windows 8.1 and API changes for Windows 8.1 (Windows Store apps using JavaScript and HTML) . If you search the latter doc for "back button" you'll find your problem directly addressed, but you'll want to go through the rest as well.


    Friday, December 13, 2013 12:23 AM
  • Thanks, the app works fine now!!

    I read the article and I have doubt that if I have a label instead of a button in my HTML5/JS will it respond to an on click event now (i.e for windows 8.1 app)?

    Friday, December 13, 2013 9:43 AM
  • A label should work if it's at the top of the Z-order. The problem with the back button was that it depended on clicks passing through a transparent layer via a mechanism which no longer exists.

    That said, if you want button-like behavior then use button-like controls rather than handling click events. The controls provide a lot of accessibility support that a good app would need to otherwise implement itself.


    Saturday, December 14, 2013 12:49 AM
  • No, a label is not responding to an onclick event after retargeting.


    Friday, December 20, 2013 7:20 PM
  • Labels in general respond to onclick if it's at the top of the Z-order. This is the same as the button case.

    If the label isn't at the top then it won't work for the same reason the button didn't. Again though, you're much better off using a button rather than faking a button with a label.

    If you're not getting clicks on your label then there's something else going on. If you need help diagnosing it them please share a link to a minimal repro sample on your SkyDrive.


    Friday, December 20, 2013 11:34 PM