diff options
author | jamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-22 20:28:44 +0000 |
---|---|---|
committer | jamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-22 20:28:44 +0000 |
commit | d2772015bbc32cc127afa92f8cccfe0c413560e4 (patch) | |
tree | d65a13c367c2f0e1b4f8bcc86cbaf362f706deb4 /remoting | |
parent | e34789ddec8c088dc9862651b01a72b887b84b4a (diff) | |
download | chromium_src-d2772015bbc32cc127afa92f8cccfe0c413560e4.zip chromium_src-d2772015bbc32cc127afa92f8cccfe0c413560e4.tar.gz chromium_src-d2772015bbc32cc127afa92f8cccfe0c413560e4.tar.bz2 |
Fix 'no propagation' bug.
'return false' is they way of preventing event propagation in HTML. 'preventDefault' is the JS equivalent.
Without this, entering an access code causes the form to be 'submitted', which reloads the page.
BUG=None
TEST=Manual
Review URL: http://codereview.chromium.org/9024018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115594 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/webapp/me2mom/event_handlers.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/remoting/webapp/me2mom/event_handlers.js b/remoting/webapp/me2mom/event_handlers.js index 0d28a98a..e39a924 100644 --- a/remoting/webapp/me2mom/event_handlers.js +++ b/remoting/webapp/me2mom/event_handlers.js @@ -14,9 +14,10 @@ function onLoad() { var goClient = function() { remoting.setMode(remoting.AppMode.CLIENT_UNCONNECTED); }; - var sendAccessCode = function() { + /** @param {Event} event */ + var sendAccessCode = function(event) { remoting.tryConnect(); - return false; + event.preventDefault(); }; var doAuthRedirect = function() { remoting.oauth2.doAuthRedirect(); |