mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Merge pull request #2713 from cpradio/master
Set focus on first item in drop down (textbox, link, whatever it may be)
This commit is contained in:
commit
a9de189682
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ export default Discourse.View.extend({
|
||||||
// fade it fast
|
// fade it fast
|
||||||
$dropdown.fadeIn('fast');
|
$dropdown.fadeIn('fast');
|
||||||
// autofocus any text input field
|
// autofocus any text input field
|
||||||
$dropdown.find('input[type=text]').focus().select();
|
$dropdown.find('input[type=text],a:first').focus().select();
|
||||||
|
|
||||||
$html.on('click.d-dropdown', function(e) {
|
$html.on('click.d-dropdown', function(e) {
|
||||||
return $(e.target).closest('.d-dropdown').length > 0 ? true : hideDropdown.apply(self);
|
return $(e.target).closest('.d-dropdown').length > 0 ? true : hideDropdown.apply(self);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue