adding debounce timer to prevent auto-closing the dialog as soon as it opens on some mobile browsers