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

Unified Diff: ui/file_manager/gallery/js/gallery.js

Issue 1275323002: Gallery: replace paper-input of rename field with HTMLInputElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/gallery/gallery.html ('k') | ui/file_manager/gallery/js/test_util.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/gallery.js
diff --git a/ui/file_manager/gallery/js/gallery.js b/ui/file_manager/gallery/js/gallery.js
index 4713b65813d5b53515ffe835778739d943c261e6..a5f0306a6ba3c3de75d40018549d2842dd21f236 100644
--- a/ui/file_manager/gallery/js/gallery.js
+++ b/ui/file_manager/gallery/js/gallery.js
@@ -84,18 +84,17 @@ function Gallery(volumeManager) {
'.filename-spacer');
/**
- * @private {PaperInput}
+ * @private {HTMLInputElement}
* @const
*/
- this.filenameEdit_ = /** @type {PaperInput} */
- (queryRequiredElement(this.filenameSpacer_, 'paper-input'));
+ this.filenameEdit_ = /** @type {HTMLInputElement} */
+ (queryRequiredElement(this.filenameSpacer_, 'input'));
this.filenameCanvas_ = document.createElement('canvas');
this.filenameCanvasContext_ = this.filenameCanvas_.getContext('2d');
// Set font style of canvas context to same font style with rename field.
- var filenameEditComputedStyle = window.getComputedStyle(
- this.filenameEdit_.inputElement);
+ var filenameEditComputedStyle = window.getComputedStyle(this.filenameEdit_);
this.filenameCanvasContext_.font = filenameEditComputedStyle.font;
this.filenameEdit_.addEventListener('blur',
@@ -761,8 +760,7 @@ Gallery.prototype.updateSelectionAndState_ = function() {
Gallery.prototype.onFilenameFocus_ = function() {
ImageUtil.setAttribute(this.filenameSpacer_, 'renaming', true);
this.filenameEdit_.originalValue = this.filenameEdit_.value;
- setTimeout(this.filenameEdit_.inputElement.select.bind(
- this.filenameEdit_.inputElement), 0);
+ setTimeout(this.filenameEdit_.select.bind(this.filenameEdit_), 0);
this.onUserAction_();
};
« no previous file with comments | « ui/file_manager/gallery/gallery.html ('k') | ui/file_manager/gallery/js/test_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698