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");
});
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?– Sergio
Enter the code of your element as well.
– Diego Souza
Out of curiosity, the API Pointerevent is compatible with Chrome 55. I cloned the @Sergio example, with
pointerdown
, also worked: https://jsfiddle.net/0ur1webv/– BrTkCa
@Lucascosta this API will simplify life for many people when browsers adopt... good suggestion.
– Sergio
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
– BrTkCa
Vinicius:vi agora o teu Edit... testa https://jsfiddle.net/4zkahL3h/1/ isto não funciona para ti?
– Sergio