1

I am using fancyBox to display an HTML element as a popup (inline type).

That works fine, but the user is able to move the popup vertically with the mouse or with touch. This behaviour seems to be standard (check the HTML example on https://fancyapps.com/fancybox/3/).

Question: is there a way to prevent this vertical movement?

Setting the modal option to true achieves this, but then the close button is removed as well, which is not what I want.

Thanks, Willem

Willem
  • 767
  • 1
  • 7
  • 10

1 Answers1

1

Use touch/vertical option for that:

touch: {
  vertical: true, // Allow to drag content vertically
  momentum: true // Continue movement after releasing mouse/touch when panning
},
Janis
  • 8,593
  • 1
  • 21
  • 27