Why does the keydown event on the diva?

There is a popup that opens into a full page in height and width, wrapper hung processor@keydown="closePictBuildingPopupSELF", but this event just is not triggered.
The task is the following - to close popup on escape, and slider(in-house) it reacted to the left and right buttons.
The question is - why not fire the event, because the block on the entire screen?
And how to do it, because I thought to hang an event handler on window, but how to do this in Vue? Because if you do, then any pressing of any key processor !!pop-up when PC is for!! will start every time, even if popup is closed and does.
April 7th 20 at 15:48
1 answer
April 7th 20 at 15:50
Solution
You will help https://stackoverflow.com/questions/148361/how-can...
That is, you need
  1. Make your div to fokusirani
  2. Before opening to Remember in what place is the focus of the user, if any
  3. To open the popup and move the focus to it
  4. To lock out the ability to leave the focus outside the modal window
  5. When closing pop-up when PC to return the focus to the user where it was previously


In addition. Inside the Vue you may attach handler to any event on the whole document. Important:
  1. When you delete a component to remove handlers
  2. Inside the handler check whether the further processing of the meaning

This is true for components such as modal Windows that you have on the page, there were not very many.

Find more questions by tags Vue.js