1.md 1.7 KB

Ignoring events fired by certain elements #4600

Events are logged in console.

Case 1: Events are ignored and they are not handled by default listeners.

  1. Move mouse cursor over a left container named Ignored container with data-cke-ignore-events="true".
  2. When it is already there, start moving it around within container boundaries, start typing in text field and start clicking on text field and button.
  3. Click on the button.

Expected results: Only then, when the mouse cursor is over the left container, new logs will stop appearing in the console. Clicking inside it, typing in text field and moving mouse cursor inside the container boundaries should not be logged in console. Clicking on a button dispatches the click event (the Dispatched click event message should be logged), but Received click event shouldn't be present in console.

One note for focus nad blur events: they will be logged in console, but only when container lost focus or gets it back, respectively.

Case 2: Events are not ignored and they are handled by default listeners.

  1. Move mouse cursor over a right container named Regular container.
  2. When it is already there, start moving it around within container boundaries, start typing in text field and start clicking on text field and button.
  3. Click on the button.

Expected results: Events should be logged in console. It shouldn't be possible to focus the text field and type anything there. Clicking on a button dispatches the click event (the Dispatched click event message should be logged) and doubled Received click event should be present in console: one from "real" user mouse click and second one from script-generated click event.