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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/SearchableView.js

Issue 2013473003: [Devtools] Esc closes searchview if focused and open (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * Copyright (C) 2011 Google Inc. All rights reserved. 5 * Copyright (C) 2011 Google Inc. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 _onSearchFieldManualFocus: function(event) 410 _onSearchFieldManualFocus: function(event)
411 { 411 {
412 WebInspector.setCurrentFocusElement(/** @type {?Node} */ (event.target)) ; 412 WebInspector.setCurrentFocusElement(/** @type {?Node} */ (event.target)) ;
413 }, 413 },
414 414
415 /** 415 /**
416 * @param {!Event} event 416 * @param {!Event} event
417 */ 417 */
418 _onSearchKeyDown: function(event) 418 _onSearchKeyDown: function(event)
419 { 419 {
420 if (isEscKey(event)) {
421 this.closeSearch();
422 event.consume(true);
423 return;
424 }
420 if (!isEnterKey(event)) 425 if (!isEnterKey(event))
421 return; 426 return;
422 427
423 if (!this._currentQuery) 428 if (!this._currentQuery)
424 this._performSearch(true, true, event.shiftKey); 429 this._performSearch(true, true, event.shiftKey);
425 else 430 else
426 this._jumpToNextSearchResult(event.shiftKey); 431 this._jumpToNextSearchResult(event.shiftKey);
427 }, 432 },
428 433
429 /** 434 /**
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 // Silent catch. 670 // Silent catch.
666 } 671 }
667 672
668 // Otherwise just do a plain text search. 673 // Otherwise just do a plain text search.
669 if (!regex) 674 if (!regex)
670 regex = createPlainTextSearchRegex(query, modifiers); 675 regex = createPlainTextSearchRegex(query, modifiers);
671 676
672 return regex; 677 return regex;
673 } 678 }
674 } 679 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698