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
|
@ -58,7 +58,7 @@ export default Discourse.View.extend({
|
|||
// fade it fast
|
||||
$dropdown.fadeIn('fast');
|
||||
// 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) {
|
||||
return $(e.target).closest('.d-dropdown').length > 0 ? true : hideDropdown.apply(self);
|
||||
|
|
Loading…
Reference in New Issue