2

It looks like, that the element of CodeMirror 6 block the native events of mouseup event.

Once I click on a slider, it will never leave it. I cannot interact with anything

enter image description here

This slider is just a decoration inside the CodeMirror

The effect can be replicated here

CodeSandbox

if you click many times, it sticks to a slider and will never leave

In principle I can manually add eventListeners to a Dom element, but I have not idea how to pass it to the default browser events standing for the range operations.

Kirill Vasin
  • 143
  • 7

1 Answers1

0

I found the roots. You should turn off the option of CM6 widget not to ignore events.

i.e.

class FEWidget extends WidgetType {
  constructor(name, ref) {
    super();
    this.ref = ref;
    this.name = name;
  }
  eq(other) {
    return this.name === other.name;
  }
  toDOM() {
    let elt = document.createElement("div");
    elt.innerText = 'Hi!'

    return elt;
  }
  ignoreEvent() {
    return true; //this LINE
  }
  destroy() {
  }
}
Kirill Vasin
  • 143
  • 7
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 12 '23 at 13:21