why popup.hide(); in version 6 dosnt work when use this
popupInput.events.on(“BeforeHide”, function(){
return false;
});
It’s expected behavior, see documentation:
https://docs.dhtmlx.com/suite/popup__api__popup_beforehide_event.html
in example https://docs.dhtmlx.com/suite/samples/popup/04_events/02_prevent_hide.html when i click button hide the popup why not hide?
If you noticed, that example was called “Prevent hide”. If the “beforeHide” event returns false, then the popup is not hidden, but if it returns true, then the popup is hidden. Simple logic.
This may be needed, for example, when the user entered data in some fields inside the popup and, without saving it, tries to close the popup. You can prevent closing and ask the user to confirm the action.
Ok, I understand but how if I use this function popupInput.events.on(“BeforeHide”, function(){
return false;
})
Then how can I hide the popup because I use popup.hide not working?
Sorry for delay. I came up with an example of code:
https://snippet.dhtmlx.com/wcda9t2z
Adapt it to your task.
Ok, thanks its very helpfull…