summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/resources
diff options
context:
space:
mode:
authordantasse@chromium.org <dantasse@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-01 18:19:44 +0000
committerdantasse@chromium.org <dantasse@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-01 18:19:44 +0000
commit811a6c5f660bfbefdda282be465ad61891e21bf8 (patch)
tree157f17832fc48ad33d20ee44025b5cf3b14ff944 /chrome/browser/sync/resources
parent279a25feea829758b83a82032100308d9f4606a8 (diff)
downloadchromium_src-811a6c5f660bfbefdda282be465ad61891e21bf8.zip
chromium_src-811a6c5f660bfbefdda282be465ad61891e21bf8.tar.gz
chromium_src-811a6c5f660bfbefdda282be465ad61891e21bf8.tar.bz2
Put the focus on the OK button if displaying the choose data types page.
This means, if you press enter, it'll work the same as if you clicked OK. BUG=47752 TEST=Set up sync -> enter username/pw, press enter on choose datatypes screen, it should start syncing and eventually get to "success". Review URL: http://codereview.chromium.org/2876017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51389 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/resources')
-rw-r--r--chrome/browser/sync/resources/choose_datatypes.html12
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/sync/resources/choose_datatypes.html b/chrome/browser/sync/resources/choose_datatypes.html
index 300dfd0..ed60867 100644
--- a/chrome/browser/sync/resources/choose_datatypes.html
+++ b/chrome/browser/sync/resources/choose_datatypes.html
@@ -64,6 +64,12 @@ input[type='submit'] {
function setChooseDataTypesCheckboxes(args) {
setStateThrobbing(false);
+ // If this frame is on top, the focus should be on it, so pressing enter
+ // submits this form.
+ if (args.iframeToShow == 'choose_data_types') {
+ document.getElementById("okButton").focus();
+ }
+
document.getElementById("keepEverythingSyncedRadio").checked =
args.keepEverythingSynced;
document.getElementById("chooseDataTypesRadio").checked =
@@ -158,11 +164,12 @@ input[type='submit'] {
});
chrome.send("ChooseDataTypes", [result]);
}
+
</script>
<body vlink=#666666
i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"
onload="initializeChooseDataTypesDialog();">
-<form id="chooseDataTypesForm">
+<form id="chooseDataTypesForm" onsubmit="sendChooseDataTypesAndClose(); return false;">
<table height="100%" width="100%" margin="0" cellpadding="0">
<tr valign="top">
<td colspan="3">
@@ -232,8 +239,7 @@ input[type='submit'] {
display:inline-block">
</span>
</span>
- <input id="okButton" type="button" i18n-values="value:ok"
- onclick='sendChooseDataTypesAndClose()'/>
+ <input id="okButton" type="submit" i18n-values="value:ok" />
<input id="cancelButton" type="button" i18n-values="value:cancel"
onclick='chrome.send("DialogClose", [""])' />
</td>