question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v3-pro] EventHandler for SELECTOR_CLASS_TOGGLER uses stopPropagation

See original GitHub issue

coreui.bundle.min.js line 2287 - 2311

  EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_CLASS_TOGGLER, function (event) {
    event.preventDefault();
    event.stopPropagation();
    var toggler = event.target;

    .....

In the event handler “stopPropagation” is called. To save the change of the design I use an event handler myself, which is not possible anymore with “stopPropagation”.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
wittichcommented, Jun 25, 2021

Just left detailed answer on SO https://stackoverflow.com/a/68127227/3001970

The trick (or maybe correct way) is to hook to existing events… in case of the sidebar there is a classtoggle event.

Hope that helps someone.

0reactions
MACscrcommented, Jun 4, 2021

ugh, this is really frustrating as I really want the toggle stated to be stored in the browser for the user and i have no way to hook into the event because of it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Event.stopPropagation() - Web APIs | MDN
The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
Read more >
stopPropagation() Event Method - W3Schools
Definition and Usage ... The stopPropagation() method prevents propagation of the same event from being called. Propagation means bubbling up to parent elements ......
Read more >
EventHandler should be able to stopPropagation and ... - GitHub
To prevent this, I used the workaround posted by @Legioth. However, this does not only call event.preventDefault() for the filtered events, but for...
Read more >
Pros and Cons of using e.stopPropagation() to prevent event ...
There are several ways you can handle events in javascript/jQuery. Two of them are: You can use a direct event handler on the...
Read more >
event.stopPropagation() | jQuery API Documentation
stopPropagation ()Returns: undefined ... We can use event. ... DOM tree will already have been executed by the time the delegated event handler...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found