MCPcopy
hub / github.com/flatpickr/flatpickr / focusAndClose

Function focusAndClose

src/index.ts:2305–2317  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2303 }
2304
2305 function focusAndClose() {
2306 self._input.focus();
2307
2308 if (
2309 window.navigator.userAgent.indexOf("MSIE") !== -1 ||
2310 navigator.msMaxTouchPoints !== undefined
2311 ) {
2312 // hack - bugs in the way IE handles focus keeps the calendar open
2313 setTimeout(self.close, 0);
2314 } else {
2315 self.close();
2316 }
2317 }
2318
2319 function selectDate(e: MouseEvent | KeyboardEvent) {
2320 e.preventDefault();

Callers 2

onKeyDownFunction · 0.85
selectDateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…