B
B
Bohdan Zhorov2019-09-09 17:00:51
JavaScript
Bohdan Zhorov, 2019-09-09 17:00:51

How to blur a form button with a directive?

Good afternoon! Tell me how to blur a button using a directive. When I press enter, a modal window opens, but when I press enter a second time, the window closes and reopens, the form button remains active. I want to send a directive, but I can't.

inserted (el) {
    el.addEventListener('click', ({ target }) => {
      target.blur();
    });
  },

Tried it in different ways but it doesn't work

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question