OLD | NEW |
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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 _onInput: function(event) | 551 _onInput: function(event) |
552 { | 552 { |
553 if (this._valueChangedTimeoutId) | 553 if (this._valueChangedTimeoutId) |
554 clearTimeout(this._valueChangedTimeoutId); | 554 clearTimeout(this._valueChangedTimeoutId); |
555 var timeout = this._searchInputElement.value.length < 3 ? 200 : 0; | 555 var timeout = this._searchInputElement.value.length < 3 ? 200 : 0; |
556 this._valueChangedTimeoutId = setTimeout(this._onValueChanged.bind(this)
, timeout); | 556 this._valueChangedTimeoutId = setTimeout(this._onValueChanged.bind(this)
, timeout); |
557 }, | 557 }, |
558 | 558 |
559 _onValueChanged: function() | 559 _onValueChanged: function() |
560 { | 560 { |
| 561 if (!this._searchIsVisible) |
| 562 return; |
561 delete this._valueChangedTimeoutId; | 563 delete this._valueChangedTimeoutId; |
562 this._performSearch(false, true); | 564 this._performSearch(false, true); |
563 }, | 565 }, |
564 | 566 |
565 __proto__: WebInspector.VBox.prototype | 567 __proto__: WebInspector.VBox.prototype |
566 } | 568 } |
567 | 569 |
568 /** | 570 /** |
569 * @interface | 571 * @interface |
570 */ | 572 */ |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 // Silent catch. | 657 // Silent catch. |
656 } | 658 } |
657 | 659 |
658 // Otherwise just do a plain text search. | 660 // Otherwise just do a plain text search. |
659 if (!regex) | 661 if (!regex) |
660 regex = createPlainTextSearchRegex(query, modifiers); | 662 regex = createPlainTextSearchRegex(query, modifiers); |
661 | 663 |
662 return regex; | 664 return regex; |
663 } | 665 } |
664 } | 666 } |
OLD | NEW |