Mousedown in Chrome 55

Asked

Viewed 65 times

2

I use the event mousedown in JS to assign an action to my object in a project in question.

With the new Chrome update to version 55 my event no longer works!

Does anyone have any idea how to use the event in this new release?

I currently use the following form.

var iddiv = document.getElementById('meuid');

iddiv.addEventListener('mousedown', function(e) {
});

Thank you all!

iddiv.addEventListener('click', function(e) {
    divSelc = e.target.id;
$("#"+divSelc).css("outline","3px solid red");
});
  • 2

    I have the Chrome Version 55.0.2883.87 m (64-bit) and it works for me... You can try it here: https://jsfiddle.net/4zkahL3h/ and see if it works?

  • Enter the code of your element as well.

  • 1

    Out of curiosity, the API Pointerevent is compatible with Chrome 55. I cloned the @Sergio example, with pointerdown, also worked: https://jsfiddle.net/0ur1webv/

  • 1

    @Lucascosta this API will simplify life for many people when browsers adopt... good suggestion.

  • 1

    Will yes @Sergio, will facilitate the capture of the various types of contacts with the screen on different devices, as these touch pens for example

  • Vinicius:vi agora o teu Edit... testa https://jsfiddle.net/4zkahL3h/1/ isto não funciona para ti?

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.