Created
September 12, 2018 20:34
-
-
Save Tenderfeel/225e2159bc56a8015a5966b673c364ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// モーダル開閉時のフォーカス操作(モーダルのルート要素にtabindex=0必要) | |
$('.uk-modal').on('show', (e) => { | |
$(e.target).data('lastFocusdElement', window.document.activeElement).focus(); | |
}).on('hide', (e) => { | |
$(e.target).data('lastFocusdElement').focus(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment