summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources
diff options
context:
space:
mode:
authorarv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 17:02:23 +0000
committerarv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 17:02:23 +0000
commit2319a2cbdd73eeb8f4fad02b61927bda979edd8d (patch)
treeaeece5014860714af1a3e319762767a76d7184a2 /chrome/browser/resources
parent887f80da171aa9a6c3e6edad585634ce287258a7 (diff)
downloadchromium_src-2319a2cbdd73eeb8f4fad02b61927bda979edd8d.zip
chromium_src-2319a2cbdd73eeb8f4fad02b61927bda979edd8d.tar.gz
chromium_src-2319a2cbdd73eeb8f4fad02b61927bda979edd8d.tar.bz2
NNTP: Make the option button pressed when the option menu is open.
BUG=21062 TEST=Click the option menu button (the top right button). The button should look pressed as long as the menu is visible. Review URL: http://codereview.chromium.org/201020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25460 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources')
-rw-r--r--chrome/browser/resources/new_new_tab.css3
-rw-r--r--chrome/browser/resources/new_new_tab.js2
2 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/resources/new_new_tab.css b/chrome/browser/resources/new_new_tab.css
index 808acc7..189679c 100644
--- a/chrome/browser/resources/new_new_tab.css
+++ b/chrome/browser/resources/new_new_tab.css
@@ -610,7 +610,8 @@ html[dir='rtl'] #view-toolbar {
background-image: url(chrome://theme/newtab_option_h);
}
-#option-button:active {
+#option-button:active,
+#option-button.open {
background-image: url(chrome://theme/newtab_option_p);
}
diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js
index 0877f97..57fbf55 100644
--- a/chrome/browser/resources/new_new_tab.js
+++ b/chrome/browser/resources/new_new_tab.js
@@ -959,6 +959,7 @@ function OptionMenu(button, menu) {
OptionMenu.prototype = {
show: function() {
this.menu.style.display = 'block';
+ addClass(this.button, 'open');
this.button.focus();
// Listen to document and window events so that we hide the menu when the
@@ -969,6 +970,7 @@ OptionMenu.prototype = {
hide: function() {
this.menu.style.display = 'none';
+ removeClass(this.button, 'open');
this.setSelectedIndex(-1);
document.removeEventListener('focus', this.boundMaybeHide_, true);