Attempt to clarify installation instructions a little
[vchess.git] / client / src / utils / modalClick.js
CommitLineData
1ef65040 1export function processModalClick(e, cb) {
dcd68c41
BA
2 // Close a modal when click on it but outside focused element
3 const data = e.target.dataset;
1ef65040 4 if (!!data.checkbox) document.getElementById(data.checkbox).checked = false;
077ba344 5 if (!!cb && ["chatWrap","peopleWrap"].includes(e.target.id)) cb();
dcd68c41 6}