keypress
is not get triggered on an overlay, after clicking on the overlay it works. Is there a way to trigger keypress
without clicking on the overlay.
Asked
Active
Viewed 181 times
1

ashwintastic
- 2,262
- 3
- 22
- 49
-
post your code please – messerbill Jan 18 '18 at 11:04
-
your question is the answer to your question. – Muhammad Omer Aslam Jan 18 '18 at 22:06
1 Answers
0
You need to have focus on the overlay or set the keylistneer closer to the body element.
Just set focus using yourElwment.focus() and it should work.

JGoodgive
- 1,068
- 10
- 20