Using jQuery UI Draggable, how to avoid drag when using scrollbar?

后端 未结 1 1642
無奈伤痛
無奈伤痛 2020-12-16 15:53

A long time ago I created a dialog box in my application. The dialog is pretty simple, position absolute, centered in the screen via javascript.

Now I have added jQu

相关标签:
1条回答
  • 2020-12-16 16:20

    As a workaround, you could try using the handle option and only make the dialog draggable by the parts that aren't scrollable. (The title or some such.)

    jsFiddle Example

    Another solution that @AlexFigueiredo pointed out involves just wrapping the content / handle in a div that handles the sizing and scrolling – that seems stop the click event from being sent to the handle.

    0 讨论(0)
提交回复
热议问题