| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 | 616 |
| 617 selection.removeAllRanges(); | 617 selection.removeAllRanges(); |
| 618 selection.addRange(selectionRange); | 618 selection.addRange(selectionRange); |
| 619 } | 619 } |
| 620 | 620 |
| 621 /** | 621 /** |
| 622 * @param {!Event} event | 622 * @param {!Event} event |
| 623 * @return {boolean} | 623 * @return {boolean} |
| 624 */ | 624 */ |
| 625 tabKeyPressed(event) { | 625 tabKeyPressed(event) { |
| 626 this.acceptAutoComplete(); | 626 return this.acceptAutoComplete(); |
| 627 | |
| 628 // Consume the key. | |
| 629 return true; | |
| 630 } | 627 } |
| 631 | 628 |
| 632 /** | 629 /** |
| 633 * @return {?Element} | 630 * @return {?Element} |
| 634 */ | 631 */ |
| 635 proxyElementForTests() { | 632 proxyElementForTests() { |
| 636 return this._proxyElement || null; | 633 return this._proxyElement || null; |
| 637 } | 634 } |
| 638 }; | 635 }; |
| 639 | 636 |
| 640 UI.TextPrompt.DefaultAutocompletionTimeout = 250; | 637 UI.TextPrompt.DefaultAutocompletionTimeout = 250; |
| 641 | 638 |
| 642 /** @enum {symbol} */ | 639 /** @enum {symbol} */ |
| 643 UI.TextPrompt.Events = { | 640 UI.TextPrompt.Events = { |
| 644 TextChanged: Symbol('TextChanged') | 641 TextChanged: Symbol('TextChanged') |
| 645 }; | 642 }; |
| OLD | NEW |