@bitrix24/b24ui-nuxt
Version:
Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE
14 lines (13 loc) • 378 B
JavaScript
export function pointerDownOutside(e, options = {}) {
const originalEvent = e.detail.originalEvent;
const target = originalEvent.target;
if (!target?.isConnected) {
e.preventDefault();
return;
}
if (options.scrollable) {
if (originalEvent.offsetX > target.clientWidth || originalEvent.offsetY > target.clientHeight) {
e.preventDefault();
}
}
}