I think this might be related to event bubbling. In my case specifically, I have a <details>
element and I was trying to bind to its toggle
event, but backbone delegates events, (as the method name suggests), meaning that it will attach an event handler to the view's root element. As the event bubbles up the DOM tree up to the root element, backbone (or jquery) then checks if the event originates from an element that matches the selector you gave it.
But: the toggle
event does not bubble: https://developer.mozilla.org/en-US/docs/Web/API/HTMLDetailsElement/toggle_event
This event is not cancelable and does not bubble.
So, maybe in the OP's case the code handling the tabs (bootstrap perhaps?) cancels the event bubbling before it reaches the view root element.
In my case this code does not work:
this.$el.on('toggle', 'details', (evt) => {console.log('toggle event on the root element', evt);});
while this code does work:
this.$el.find('details').on('toggle', (evt) => {console.log('toggle event on the details element itself', evt);});