| 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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 | 602 |
| 603 selection.removeAllRanges(); | 603 selection.removeAllRanges(); |
| 604 selection.addRange(selectionRange); | 604 selection.addRange(selectionRange); |
| 605 } | 605 } |
| 606 | 606 |
| 607 /** | 607 /** |
| 608 * @param {!Event} event | 608 * @param {!Event} event |
| 609 * @return {boolean} | 609 * @return {boolean} |
| 610 */ | 610 */ |
| 611 tabKeyPressed(event) { | 611 tabKeyPressed(event) { |
| 612 this.acceptAutoComplete(); | 612 return this.acceptAutoComplete(); |
| 613 | |
| 614 // Consume the key. | |
| 615 return true; | |
| 616 } | 613 } |
| 617 | 614 |
| 618 /** | 615 /** |
| 619 * @return {?Element} | 616 * @return {?Element} |
| 620 */ | 617 */ |
| 621 proxyElementForTests() { | 618 proxyElementForTests() { |
| 622 return this._proxyElement || null; | 619 return this._proxyElement || null; |
| 623 } | 620 } |
| 624 }; | 621 }; |
| 625 | 622 |
| 626 UI.TextPrompt.DefaultAutocompletionTimeout = 250; | 623 UI.TextPrompt.DefaultAutocompletionTimeout = 250; |
| 627 | 624 |
| 628 /** @enum {symbol} */ | 625 /** @enum {symbol} */ |
| 629 UI.TextPrompt.Events = { | 626 UI.TextPrompt.Events = { |
| 630 ItemApplied: Symbol('text-prompt-item-applied'), | 627 ItemApplied: Symbol('text-prompt-item-applied'), |
| 631 ItemAccepted: Symbol('text-prompt-item-accepted') | 628 ItemAccepted: Symbol('text-prompt-item-accepted') |
| 632 }; | 629 }; |
| OLD | NEW |