Events in Internet Explorer don't work as expected

I have a Backbone view where I bind some events to the elements of the view.
In Chrome everything works as expected, but in IE11 only one event is logged and upon close examination it does not have the same behavior:

Event
  events: {
          'click.colour': 'changeColour',
          'click.size': 'changeSize',
           "press .stop": "stopEvent",
          'click button.draw-menu': 'draw',
          'click' : "preventDefault"
  }

The view is a button that, when clicked, shows a context menu with some options (radio buttons). According to the click of the radio button (which is inside a specific div with a different class) the function is called. The problem is that when I click inside the color or size class , none of the defined events are fired, but instead the click event above is defined . I have considered event.currentTarget and event.targetfor the triggered event, and they are not only equal but also refer to the root of the view, not the clicked element. The correct event is being fired in chrome and both event.currentTarget and event.target refer to the correct element, not the root of the view.

+3


source to share





All Articles