Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Unified Diff: pkg/dartdoc/lib/src/client/dropdown.dart

Issue 11036058: Show top-level members (again). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/dartdoc/lib/dartdoc.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dartdoc/lib/src/client/dropdown.dart
diff --git a/pkg/dartdoc/lib/src/client/dropdown.dart b/pkg/dartdoc/lib/src/client/dropdown.dart
index eab7e7901b8be63d230736461329f6f5120abd42..eed32aea797bc1923d3f542ff0375eced27d9672 100644
--- a/pkg/dartdoc/lib/src/client/dropdown.dart
+++ b/pkg/dartdoc/lib/src/client/dropdown.dart
@@ -324,8 +324,11 @@ void hideDropDown() {
/** Activate search on Ctrl+3 and S. */
void shortcutHandler(KeyboardEvent event) {
- if (event.keyCode == 0x33/* 3 */ && event.ctrlKey ||
- event.keyCode == 0x53/* S */) {
+ if (event.keyCode == 0x33/* 3 */ && event.ctrlKey) {
+ searchInput.focus();
+ event.preventDefault();
+ } else if (event.target != searchInput && event.keyCode == 0x53/* S */) {
+ // Avoid preventing writing 's' in the search input.
Lasse Reichstein Nielsen 2012/10/05 14:06:21 Avoid preventing -> Allow (or "Don't prevent"). Tw
Johnni Winther 2012/10/05 14:34:01 Yes it does! Done.
searchInput.focus();
event.preventDefault();
}
« no previous file with comments | « pkg/dartdoc/lib/dartdoc.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698