andreas.s...@naradana.com
unread,Oct 9, 2011, 8:13:07 AM10/9/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Maps JavaScript API v3
I have a similar problem, and checked with Chrome debugger the
possibilities to handle it.
The bad news: google captures all the events of the input field,
before it's possible to go in-between. So it's not possible to use
event handlers of your favorite framework (in my case: dojo)
The good news: there is a workaround by using google's event handlers.
It's not nice but it works:
var input = document.getElementById('inputId');
// dojo.connect(input, 'onkeydown', function(e) {
google.maps.event.addDomListener(input, 'keydown', function(e) {
if (e.keyCode == 13)
{
if (e.preventDefault)
{
e.preventDefault();
}
else
{
// Since the google event handler framework does not handle
early IE versions, we have to do it by our self. :-(
e.cancelBubble = true;
e.returnValue = false;
}
}
});
Tested with IE8 and IE7 emulators within IE9, IE9, Firefox 4.0, Chrome
12
doctype XHTML 1.0 transitional
Have fun
Andreas
Naradana WebSolutions