I'm trying to make sure content inside an infobox popup scrolls so all the info is shown but when I try to scroll using the scrollbar on releasing the mouse button the map sticks to this point as if holding down and panning. Here's some code to reproduce:
var location = new Microsoft.Maps.Location(0, 0);
var html = "title<br/>description desc desc"
+ " description desc desc description desc desc"
+ " description desc desc description desc desc"
+ " description desc desc description desc desc"
+ " description desc desc description desc desc"
;
var popupHTML = '<div style="height: 50px; width: 100px; overflow: auto; background: white;">{content}</div>';
var options = {
htmlContent: popupHTML.replace('{content}', html),
visible: true,
};
var popup = new Microsoft.Maps.Infobox(location, options);
map.entities.push(popup);
or alternatively paste the below into the Bing maps SDK under infobox section:
map.entities.clear();
var infoboxOptions = {title:'Infobox Title', description:'<div style="height:20px; overflow: auto;">Infobox description description description description description description description description description description description description description description description description description description description<div>'};
var defaultInfobox = new Microsoft.Maps.Infobox(map.getCenter(), infoboxOptions );
map.entities.push(defaultInfobox);
Then try to scroll down and when you release, the map will be stuck to that position as if you're holding down and panning.
Any suggestions welcome, Thanks!