not working properly with 'addEventListner'
See original GitHub issuesince 0.2.0 driver.js was not working to be properly with addEventLister
method, just blinking.
I tested with Firefox and Google Chorme on Mac, either same results…
var driver = new Driver();
document.getElementById('btn1')
.addEventListener('click', function(event) {
driver.highlight({
element: '#form1',
popover: {
title: 'Title for the Popover',
description: 'Description for it',
}
});
});
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
addEventListener not working in javascript - Stack Overflow
I am learning addEventListener,I was testing one of the example but its not working .Can anybody tell me what i am doing wrong...
Read more >Event listeners not working? 3 key areas to troubleshoot
If your event listener not working is dependent on some logic, whether it's about which element it'll listen on or if it's registered...
Read more >addEventListener not working? Using exact example from ...
I am using the direct example for setting up Laravel Cashier using Laravel v6.8.0 and Cashier v10.5.1 For some reason addEventListener on the...
Read more >[Solved]Why addEventListener not working? - Sololearn
[Solved]Why addEventListener not working? · + 8. You must apply any JS only after the page content is loaded. So you should put...
Read more >addEventListener not working - The freeCodeCamp Forum
This is done in codepen so I didnt include and tags ,but the issue is I am not getting the return statement message...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @kei0719 you need to add
event.stopPropagation()
on the button clickAlso, it is obvious but, if the button is anchor with
href="#"'
, you may also have to doevent.preventDefault()
to make the page not scroll to topHey, yes it is mentioned in the readme also, you need to add that. It is how the
driver
is implemented. Since the element is located out of the element to be highlighted, clicking this displays the overlay and immediately catches this click event if you don’t usee.stopPropagation()
and clears it. I need to handle it better but for now, you need to add this