Browse files

Fixes faulty "PointerCancel" event registration in ListView.

WinJS ListView attempts to register for "PointerCancel" event, but only the "pointercancel" event is supported in all modern browsers, so the event never gets registered.
Today there is no direct impact from this bug, because the ListView relies on "PointerCancel" or "lostpointercapture" events to clean up UI state if a user on a touch device presses down on a listview item but then drags their finger to  scroll the listview items.
Yoday that user behavior will result in both "pointercancel" and "lostpointercapture" events being fired synchronously.
However, there is a proposed change that Chrome and Edge may move to implement where the "lostpointercapture" event may not fire because pointer capture will no longer be guaranteed to happen synchronously.
Once this change takes effect the ListView will no longer be guaranteed to recieve "lostpointercapture" events and will fail to clean up state correctly, unless this "pointercanel" event registration is fixed.
  • Loading branch information...
AmazingJaze committed Feb 15, 2017
1 parent 80d773c commit a48a12e33e08fccdea7879af877b2cc3a7cb8ec3
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/js/WinJS/Controls/ListView.js
@@ -1685,7 +1685,7 @@ define([
modeHandler("MSHoldVisual", true),
modeHandler("PointerCancel", true),

0 comments on commit a48a12e

Please sign in to comment.