0

I have Material design drawer, how can I remove events like touchmove, touchstart and touchend which close my drawer if I swipe to left?

benvc
  • 14,448
  • 4
  • 33
  • 54
mugukamil
  • 33
  • 1
  • 6
  • 1
    Why not try [`preventDefault()`](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)? – benvc Aug 15 '18 at 18:40
  • @benvc I have inside my sidebar some items which need touch events - like price slider, color wheel... but I tried also to ```preventDefault```, ```stopPropagation```... it seems that in library it already event which fires up... and if I haven'n point to this function I cant to ```removeEventListener()``` ... Anyway thanks for the comment – mugukamil Aug 16 '18 at 18:51
  • 1
    Depending on the component you are using, some have a "permanent" or "fixed" option built in if you want the drawer to be a fixed navigation element that never closes. That said, I am not exactly sure what you are after. If you post the relevant part of your code with a bit more explanation of what you want, someone may be able to help out more. – benvc Aug 16 '18 at 18:58
  • @benvc great, I want that in desktop it should be permanent, but in mobile it should be 'closable'. this is the demo... http://mature-caption.surge.sh/ – mugukamil Aug 17 '18 at 19:18
  • in mobile.. like if you want to choose sorting options(which are offscreen) or something else, sometimes it closes menu – mugukamil Aug 17 '18 at 19:19

0 Answers0