locked
WinJS.UI.ListView.onselectionchanging preventDefault is not working

    Question

  • I am trying to prevent a user to zoom in on an item when in snapped ViewState. My ListView is in zoomedOut mode and in snapped ViewState. I hit the onselectionchanging event handler, but eventInfo.preventDefault() does not (sink the event) and it returns a status of undefined. Moreover, eventInfo.detail.preventTapBehavior() also does not (prevent TapBehavior). Any help would be appreciated.

    WORKAROUND: In onwindowresize, I set the ListView's selectionMode, tapBehavior and swipeBehavior to 'none' when the ListView is in snapped ViewState, otherwise I set them to 'single', 'directSelect' and 'select' respectively.

    • Edited by Ydnorok Friday, December 7, 2012 7:38 AM
    Friday, December 7, 2012 7:06 AM