OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * Overrided metadata worker's path. | 6 * Overrided metadata worker's path. |
7 * @type {string} | 7 * @type {string} |
8 */ | 8 */ |
9 ContentMetadataProvider.WORKER_SCRIPT = '/js/metadata_worker.js'; | 9 ContentMetadataProvider.WORKER_SCRIPT = '/js/metadata_worker.js'; |
10 | 10 |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 // Handle mode specific shortcut keys. | 769 // Handle mode specific shortcut keys. |
770 if (this.currentMode_.onKeyDown(event)) { | 770 if (this.currentMode_.onKeyDown(event)) { |
771 event.preventDefault(); | 771 event.preventDefault(); |
772 return; | 772 return; |
773 } | 773 } |
774 | 774 |
775 // Handle application wide shortcut keys. | 775 // Handle application wide shortcut keys. |
776 switch (keyString) { | 776 switch (keyString) { |
777 case 'Backspace': | 777 case 'Backspace': |
778 // The default handler would call history.back and close the Gallery. | 778 // The default handler would call history.back and close the Gallery. |
779 event.preventDefault(); | 779 // Except while typing into text. |
| 780 if(!event.target.classList.contains('text')) |
| 781 event.preventDefault(); |
780 break; | 782 break; |
781 | 783 |
782 case 'm': // 'm' switches between Slide and Mosaic mode. | 784 case 'm': // 'm' switches between Slide and Mosaic mode. |
783 if (!this.modeSwitchButton_.disabled) | 785 if (!this.modeSwitchButton_.disabled) |
784 this.toggleMode_(undefined, event); | 786 this.toggleMode_(undefined, event); |
785 break; | 787 break; |
786 | 788 |
787 case 'v': | 789 case 'v': |
788 case 'MediaPlayPause': | 790 case 'MediaPlayPause': |
789 if (!this.slideshowButton_.disabled) { | 791 if (!this.slideshowButton_.disabled) { |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1060 */ | 1062 */ |
1061 var initializePromise = | 1063 var initializePromise = |
1062 Promise.all([loadTimeDataPromise, volumeManagerPromise]). | 1064 Promise.all([loadTimeDataPromise, volumeManagerPromise]). |
1063 then(function(args) { | 1065 then(function(args) { |
1064 var volumeManager = args[1]; | 1066 var volumeManager = args[1]; |
1065 gallery = new Gallery(volumeManager); | 1067 gallery = new Gallery(volumeManager); |
1066 }); | 1068 }); |
1067 | 1069 |
1068 // Loads entries. | 1070 // Loads entries. |
1069 initializePromise.then(reload); | 1071 initializePromise.then(reload); |
OLD | NEW |