none
Bug Report : v7 API hijacks arrow keys RRS feed

  • Question

  • In a webpage with a v7 api map

    - the arrow keys always scroll the map, even if you first click a non-map part of the page

    - had feedback from a user who was unable to scroll down the page

    - page-down-key, mouse-wheel, scroll-bar would have work  ** if they had them **, and if they knew to try using them

    Suggested Solution

    - when the map is in focus, arrow keys scroll the map

    - when the rest of the page is in focus, arrow keys scroll the page

    Note

    - I have seen other forum qu's raise this issue, and solutions including disabling keyboard input, or blur'ing the map, but that throws out the baby with the bath water. It would be nice if this was fixed globally without having everyone having to do bespoke hacks.

    - first time in several years of having a bing maps website that someone has raised this issue, so most people must work around it (e.g. I never realised this effect as I always use the mouse wheel or scrollbar to scroll up and down, never the arrow keys), so not urgent

    Andrew


    Sunday, October 12, 2014 5:04 PM

Answers

  • The reason for this is that if the user has focus on something that's displayed on the map, the map itself would not have focus and the keyboard would normally not work with the map. So all keyboard events are used for panning the map. If you want to get rid of this you can easily disable the keyboard on the map using the map options, for example:

    map = new Microsoft.Maps.Map(document.getElementById('myMap'), {credentials: 'Your Bing Maps Key', disableKeyboardInput: true});

    The V7 control is about 5 years old and I've only have 3 or 4 people mention any issues with how it handles keyboard events.


    http://rbrundritt.wordpress.com


    Monday, October 13, 2014 8:04 AM

All replies

  • The reason for this is that if the user has focus on something that's displayed on the map, the map itself would not have focus and the keyboard would normally not work with the map. So all keyboard events are used for panning the map. If you want to get rid of this you can easily disable the keyboard on the map using the map options, for example:

    map = new Microsoft.Maps.Map(document.getElementById('myMap'), {credentials: 'Your Bing Maps Key', disableKeyboardInput: true});

    The V7 control is about 5 years old and I've only have 3 or 4 people mention any issues with how it handles keyboard events.


    http://rbrundritt.wordpress.com


    Monday, October 13, 2014 8:04 AM
  • Disabling the keyboard-input when the map has a mouse-out event, and enabling it when the map has a mouse-in event might be a solution.

    But it is fair to say that in 5 years, not many people have mentioned it...

    "wont fix" it is then.

    Tuesday, October 14, 2014 8:09 PM