Wk-notes-11-07-vitual-box-n-onblur-for-div
Last updated
Was this helpful?
Last updated
Was this helpful?
install virtual box
download image from (virtual machines includes certain browsers for testing only), ⚠️the image will expire, use virtual box snapshot to rollback when expired.
create virtual box from image
⚠️due to license issue, the system and browser in virtual box looks very old style
we can connect the virtual box browser to host machine localhost
, it will not work right away, do ipconfig
and get the gateway ip as , use that to get access from host machine localhost
Test it!
blur
and focus
event do NOT bubble, but they can be captured. focusin
and focusout
WILL bubble tho.
To achieve PopupClickAway, which close the popup when click/focus on somewhere else in the page.
Common practices:
I. Material-ui ClickAwayListener
:
Add EventListener on focusin
, and click
II. 1.AtlasKit
is using programmtically focus control for every key stroke 'Tab'
is using - document.addEventListener('click')
to manage click outside
Ref: AtlasKit
III. react-focus-lock
TODO
Ref: Material-ui ClickAwayListener
DropdownItemFocusManager
Droplist