parent
88033a7539
commit
5cfb11641c
|
@ -75,6 +75,15 @@ export default class Popover extends Component {
|
|||
|
||||
this.document.addEventListener('keydown', this.docKeyDownHandler);
|
||||
this.document.addEventListener('focusin', this.docFocusInHandler);
|
||||
let firstFocusable = this.element.querySelector('input, textarea');
|
||||
if (firstFocusable) {
|
||||
firstFocusable.addEventListener('focus', () => {
|
||||
firstFocusable.select();
|
||||
});
|
||||
setTimeout(() => {
|
||||
firstFocusable.focus();
|
||||
}, 200);
|
||||
}
|
||||
|
||||
this.deregisterCallback = this.$transitions.onStart({}, () => this.hide());
|
||||
this.relocate();
|
||||
|
|
Loading…
Reference in New Issue