(el: HTMLElement)
| 39 | // the handler can see a non-zero `distanceFromBottom` and incorrectly assume |
| 40 | // the user scrolled. |
| 41 | const markAuto = (el: HTMLElement) => { |
| 42 | auto = { |
| 43 | top: Math.max(0, el.scrollHeight - el.clientHeight), |
| 44 | time: Date.now(), |
| 45 | } |
| 46 | |
| 47 | if (autoTimer) clearTimeout(autoTimer) |
| 48 | autoTimer = setTimeout(() => { |
| 49 | auto = undefined |
| 50 | autoTimer = undefined |
| 51 | }, 1500) |
| 52 | } |
| 53 | |
| 54 | const isAuto = (el: HTMLElement) => { |
| 55 | const a = auto |
no outgoing calls
no test coverage detected