jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.65k stars 722 forks source link

DBClick Option #487

Open wnylund opened 2 years ago

wnylund commented 2 years ago

Hey, I was trying to use the double click example and it would not allow me to enter anything into the text field. Am I doing something wrong?

jerosoler commented 2 years ago

The demo should be reviewed. It doesn't seem to work for me either. A modal, pop-up would have to go outside the "drawflow" container. And there will be no problem.

ignacioamadeo commented 2 years ago

Hi, the preventDefault from editor_mode='fixed' blocks the default actions in the input fields.

An easier way around I found is to add an eventListener to the inputs you want to work in that modal/window/popup:

hereYourInput.addEventListener('click', this.skipPreventDefault.bind(this));

skipPreventDefault(event){
    let clickedElement = event.target.id;
    document.getElementById(clickedElement).focus()
}

Hope it helps