Vue mousedown не работает

Содержание
  1. VueJS. Как включить событие следить за координатами мышки
  2. Vue mouseup and mousedown event doesn’t work as expected
  3. 2 Answers 2
  4. Not the answer you’re looking for? Browse other questions tagged javascript vue.js or ask your own question.
  5. Related
  6. Hot Network Questions
  7. Subscribe to RSS
  8. mouse modifier @click.right not working #5330
  9. Comments
  10. stefanonepa commented Mar 30, 2017
  11. Version
  12. Reproduction link
  13. Steps to reproduce
  14. What is expected?
  15. What is actually happening?
  16. Kingwl commented Mar 30, 2017
  17. stefanonepa commented Mar 30, 2017
  18. stefanonepa commented Mar 30, 2017
  19. Kingwl commented Mar 30, 2017
  20. Kingwl commented Mar 30, 2017
  21. stefanonepa commented Mar 30, 2017
  22. Kingwl commented Mar 30, 2017
  23. stefanonepa commented Mar 30, 2017
  24. yyx990803 commented Mar 30, 2017
  25. stefanonepa commented Mar 30, 2017
  26. stefanonepa commented Apr 3, 2017
  27. mouse modifier @click.right not working #5330
  28. Comments
  29. stefanonepa commented Mar 30, 2017
  30. Version
  31. Reproduction link
  32. Steps to reproduce
  33. What is expected?
  34. What is actually happening?
  35. Kingwl commented Mar 30, 2017
  36. stefanonepa commented Mar 30, 2017
  37. stefanonepa commented Mar 30, 2017
  38. Kingwl commented Mar 30, 2017
  39. Kingwl commented Mar 30, 2017
  40. stefanonepa commented Mar 30, 2017
  41. Kingwl commented Mar 30, 2017
  42. stefanonepa commented Mar 30, 2017
  43. yyx990803 commented Mar 30, 2017
  44. stefanonepa commented Mar 30, 2017
  45. stefanonepa commented Apr 3, 2017
  46. Событие Vue mouseup и mousedown работает не так, как ожидалось
  47. 2 ответа
  48. Похожие вопросы:

VueJS. Как включить событие следить за координатами мышки

хочу сделать drag элемент, создал div блок

вызываю событие при нажатой клавиши мышки

Помощь в написании контрольных, курсовых и дипломных работ здесь.

Отключить и включить работу мышки
Добрый вечер. Вопрос собственно в названии темы. Можно ограничиться лишь отключением левой кнопки.

Событие нажатия мышки
как сделать так чтобы мышка автоматически нажималась ? Добавлено через 3 минуты и как «если.

Событие нажатой мышки + движение
Здравствуйте, товарищи, пытаюсь создать свой велосипед.. т.е. слайдер (что то на подобии input.

напрямую координаты мыши нельзя получить. Решение: повесить обработчик на mousemove и сохранять координаты мыши в две переменные:

ComboBox событие указателя мышки
Всех приветствую! В ComboBox раскрываю список с items, далее провожу над списком мышкой и item.

QQuickWidget на qWidget не работает событие мышки
Создал сцену 3D в qml запустил с начало в Qt3DQuickWindow, в сцене работает управление камеры с.

Сделать событие по клику колеса прокрутки мышки
Здравствуйте. Подскажите пожалуйста, как сделать событие именно на клик колеса мышки, а не.

Мульти событие для мышки, mousdown + mousmove
Всем привет, столкнулся с такой проблемой что у меня почему то не корректно отрабатывали 2 события.

Источник

Vue mouseup and mousedown event doesn’t work as expected

I have a following code which basically disables the button on mousedown event and enables it back again on mouseup event. However, the mouseup event doesn’t enable the button for some reason.

Читайте также:  Настроить путь навигации navitel

Here’s a code snippet:

2 Answers 2

When a button is disabled it does not fire the event on mousedown.

A disabled button is unusable and un-clickable.

To avoid this problem, you can simulate the «disabled» state of the button by using css and your custom logic inside toggle()

Please check my example.

When button will have disabled mouseover will be disabled. You can add class disabled and add additional method on button click.

Not the answer you’re looking for? Browse other questions tagged javascript vue.js or ask your own question.

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.10.18.40485

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

mouse modifier @click.right not working #5330

Comments

stefanonepa commented Mar 30, 2017

Version

Steps to reproduce

click on the textarea with the right click of your mouse

What is expected?

it should add in the textarea the following text:

What is actually happening?

there is only the text:

The text was updated successfully, but these errors were encountered:

Kingwl commented Mar 30, 2017

stefanonepa commented Mar 30, 2017

Sorry, I’ll try with a version >2.2.1,

stefanonepa commented Mar 30, 2017

sorry, but in this updated version it doesn’t work either:
https://jsfiddle.net/z1jhpewo/1/

Kingwl commented Mar 30, 2017

Kingwl commented Mar 30, 2017

stefanonepa commented Mar 30, 2017

@Kingwl I’m not sure that this documentation is very reliable, because in the explanation here: https://javascript.info/mouse-events-basics#complex-events , it says that contextmenu is fired on mousedown (and in the example it didn’t write contextmenu if you just mousdown the right button).

In the other way it says that a click event is fired when mousedown is followed by by a mouseup. So it seems that

should works, you do not agree?

Kingwl commented Mar 30, 2017

The click event should only be fired for the primary pointer button (i.e., when button value is 0, buttons value is 1). Secondary buttons (like the middle or right button on a standard mouse) MUST NOT fire click events. The click event MAY be preceded by the mousedown and mouseup events on the same element, disregarding changes between other node types (e.g., text nodes). Depending upon the environment configuration, the click event MAY be dispatched if one or more of the event types mouseover, mousemove, and mouseout occur between the press and release of the pointing device button. The click event MAY also be followed by the dblclick event.

stefanonepa commented Mar 30, 2017

@Kingwl thank you for the standard (even it’s a bit foggy for me)

Читайте также:  Почему не работает ctrl excel

But how should I interpret or use the .right of the «mouse button modifiers» (cf. https://vuejs.org/v2/guide/events.html#Mouse-Button-Modifiers)? Because with the @click.middle it fire a click event. Maybe I should suggest to add some info in the official documentation?

yyx990803 commented Mar 30, 2017

Hmm maybe click.right should be aliased into contextmenu at compile time?

stefanonepa commented Mar 30, 2017

It would be a great!

stefanonepa commented Apr 3, 2017

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

mouse modifier @click.right not working #5330

Comments

stefanonepa commented Mar 30, 2017

Version

Steps to reproduce

click on the textarea with the right click of your mouse

What is expected?

it should add in the textarea the following text:

What is actually happening?

there is only the text:

The text was updated successfully, but these errors were encountered:

Kingwl commented Mar 30, 2017

stefanonepa commented Mar 30, 2017

Sorry, I’ll try with a version >2.2.1,

stefanonepa commented Mar 30, 2017

sorry, but in this updated version it doesn’t work either:
https://jsfiddle.net/z1jhpewo/1/

Kingwl commented Mar 30, 2017

Kingwl commented Mar 30, 2017

stefanonepa commented Mar 30, 2017

@Kingwl I’m not sure that this documentation is very reliable, because in the explanation here: https://javascript.info/mouse-events-basics#complex-events , it says that contextmenu is fired on mousedown (and in the example it didn’t write contextmenu if you just mousdown the right button).

In the other way it says that a click event is fired when mousedown is followed by by a mouseup. So it seems that

should works, you do not agree?

Kingwl commented Mar 30, 2017

The click event should only be fired for the primary pointer button (i.e., when button value is 0, buttons value is 1). Secondary buttons (like the middle or right button on a standard mouse) MUST NOT fire click events. The click event MAY be preceded by the mousedown and mouseup events on the same element, disregarding changes between other node types (e.g., text nodes). Depending upon the environment configuration, the click event MAY be dispatched if one or more of the event types mouseover, mousemove, and mouseout occur between the press and release of the pointing device button. The click event MAY also be followed by the dblclick event.

stefanonepa commented Mar 30, 2017

@Kingwl thank you for the standard (even it’s a bit foggy for me)

But how should I interpret or use the .right of the «mouse button modifiers» (cf. https://vuejs.org/v2/guide/events.html#Mouse-Button-Modifiers)? Because with the @click.middle it fire a click event. Maybe I should suggest to add some info in the official documentation?

yyx990803 commented Mar 30, 2017

Hmm maybe click.right should be aliased into contextmenu at compile time?

Читайте также:  Установил роутер не работает

stefanonepa commented Mar 30, 2017

It would be a great!

stefanonepa commented Apr 3, 2017

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Событие Vue mouseup и mousedown работает не так, как ожидалось

У меня есть следующий код, который в основном отключает кнопку при событии mousedown и снова включает ее при событии mouseup. Однако событие mouseup по какой-то причине не включает эту кнопку.

Вот фрагмент кода:

2 ответа

Я мог бы поклясться, что это не так, как раньше, но с jquery мое событие click срабатывает, даже если я возвращаю false как при mousedown, так и при mouseup.

Я пытаюсь определить, когда mouseup (отпущенная кнопка мыши) происходит вне элемента, на котором было вызвано событие mousedown. У меня есть несколько кнопок, которые я изменяю CSS (с помощью классов) с помощью mousedown (нажатие кнопки) и завершения щелчка (mousedown+mouseup). Проблема в том, что.

Когда button отключен, он не запускает событие при наведении мыши.

Отключенная кнопка непригодна для использования и не кликабельна.

Чтобы избежать этой проблемы, вы можете смоделировать состояние кнопки «disabled» с помощью css и вашей пользовательской логики внутри toggle()

Пожалуйста, проверьте мой пример.

Когда кнопка будет отключена, наведение мыши будет отключено. Вы можете добавить класс отключен и добавить дополнительный метод при нажатии кнопки.

Похожие вопросы:

я пытаюсь перетащить изображение карты на canvas из javascript, но событие mouseup, похоже, не работает, хотя оно находится внутри main(). Как только карта выбрана, она следует за мышью, но.

Я пытаюсь перенаправить вводы мыши в моем приложении Windows 7 в какое-то другое окно. Если я делаю это, когда получаю WM_LBUTTONUP, это работает (где MouseDown и MouseUp-это функции SendInput в Win.

Я делаю пользовательский элемент управления с панелью. Я хочу иметь возможность перетаскивать его, поэтому я реализовал это в событии MouseDown моего контроля. Но я хочу, чтобы эта штука.

Я мог бы поклясться, что это не так, как раньше, но с jquery мое событие click срабатывает, даже если я возвращаю false как при mousedown, так и при mouseup.

Я пытаюсь определить, когда mouseup (отпущенная кнопка мыши) происходит вне элемента, на котором было вызвано событие mousedown. У меня есть несколько кнопок, которые я изменяю CSS (с помощью.

Если вы пытаетесь поймать событие щелчка правой кнопкой мыши на элементе управления, чтобы выбрать ячейку в сетке или показать всплывающее меню: Какое из MouseDown или MouseUp событий следует.

Я работаю над приложением WPF, где я обработал событие Mouse down, которое в конечном итоге появляется MessageBox.. Но после того, как MessageBox появляется на mouseDown, он съедает соответствующее.

Событие mousedown работает нормально, а событие mouseup-нет. Как событие mouseup рекурсивно вызывает down()? $(document).ready(function()< function fly()< $(img).animate(

Я делаю диктофон в Angular (ионный) Код контроллера выглядит следующим образом:

Источник

Оцените статью