Explain why you need to be able to distinguish between app and device interaction when interpreting touch events.?
What will be an ideal response?
While users can interact via touch with an app, they also use touch to perform browser and device interactions, known asgestures, for activities such as scrolling the page and viewing device notifications. For instance, in addition to executing code in response to a touchmove event that you specify, the device's operating system may also interpret thetouchmoveevent as the user interacting with the interface to scroll the page. As you can imagine, users would find such unpredictable results frustrating. To ensure that the operating system interface does not respond to events generated when users interact with an app, you can use thepreventDefault()method. By adding the preventDefault()method within event handler code, you prevent touch actions on specific elements from also triggering interface gestures.
You might also like to view...
The sequence of stages which process a single computer instruction is called the ________
A) ALU B) kernel memory C) control cycle D) machine cycle
Display screens that respond to commands initiated with your finger or a stylus are called ________ screens
Fill in the blank(s) with correct word