Skip to content

Commit

Permalink
MDL-33506 Filepicker: Search box text will be selected on focus
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajesh Taneja committed Jun 14, 2012
1 parent f8dfdb5 commit d01ebb9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions repository/filepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1743,6 +1743,14 @@ M.core_filepicker.init = function(Y, options) {
if (obj.repo_id == scope.active_repo.id && obj.form) {
// if we did not jump to another repository meanwhile
searchform.setContent(obj.form);
// Highlight search text when user click for search.
var searchnode = searchform.one('input[name="s"]');
if (searchnode) {
searchnode.once('click', function(e) {
e.preventDefault();
this.select();
});
}
}
}
}, false);
Expand Down

0 comments on commit d01ebb9

Please sign in to comment.