Stylus scrolling instead of writing

Hi, I was working with Kami on a microsoft active stylus 2-in-1 device in front of my class when the stylus suddenly stopped writing and would only scroll. Nothing I tapped responded to the stylus correctly and I was dead in the water. How do I avoid this for the future, or what do I do if this happens to one of my students?
(I tried refreshing the website, restarting chrome and finally had to restart my computer for it to work correctly again.)