anseki / jquery-plainmodal

The simple jQuery Plugin for fully customizable modal windows.
http://anseki.github.io/jquery-plainmodal/
MIT License
78 stars 11 forks source link

long content #16

Closed codetinker closed 5 years ago

codetinker commented 5 years ago

Hi,

I been trying to get long content on plainmodal with no success at all. I want to scrollbar not on the div(or container) , because it weird. Scrollbar should be like normal page scrollbar.

I manage to get the modal working with div at the right side of the page, but clicking on the overlay is not working.

Could you provide a working example for this? I dont see this example on demo page.

thanks in advance

anseki commented 5 years ago

Hi @codetinker, thank you for your comment.

So, do you mean that the modal window is not closed when you click the overlay? You have to reproduce a matter to inspect any problem. Also, I have to see your situation to help you. Could you reproduce that? For example, show me an example in: https://jsfiddle.net/

anseki commented 5 years ago

Also, what is the "scrollbar on the div" you said? Do you mean the CSS overflow: scroll for the <div> element? And also, what do you mean by “weird”? Do you mean that the CSS overflow: scroll for the <div> element didn't work?

codetinker commented 5 years ago

Hi @anseki,

If I follow your example, it look like this: https://jsfiddle.net/codetinker/s2cxtfh3/

What i meant with div scroll is this, i dont want this: https://jsfiddle.net/codetinker/6bad5rsm/

But i wanted it to be like this, but since im using the wrapper(div class), it cover the overlay so click on the overlay wont work: https://jsfiddle.net/codetinker/ybvta843/

anseki commented 5 years ago

I see. The cause is very simple. The overlay works when you click that. That is, the overlay in your example didn't work because you didn't click that, you clicked the wrapper, it is not the overlay. This is correct behavior. So, you can control the click event by pointer-events property. https://jsfiddle.net/cd519Lyf/

codetinker commented 5 years ago

wow it works. Thanks alot!

anseki commented 5 years ago

I'm glad if I could help you. :smile: BTW, as the document says, using PlainModal instead is recommended. https://anseki.github.io/plain-modal/