Modal Scrolling and jQuery use.
juan-igor opened this issue · 4 comments
Expected Behavior
I hoped that by opening a modal higher than the screen I would be able to use the scroll bar. However, it only works if I display the "overflow: auto" scroll bar in CSS and click on it. Using the mouse scroll it scrolls the screen in the background and not the modal.
I can't use jquery either. When I use something like "$ ('# div')" returns me a console error saying "$" is not set.
Current Behavior
I can't scroll the modal with the mouse, just the background page.
And I can't use jQuery either.
- Note: I have all imports made. I am using the default app.blade.php that the project makes available.
- Note²: I already tried to use what bootstrap recommends for long modals which is to add the "modal-dialog-scrollable" class but it didn't work either.
Hello @juan-igor,
Thank you for using our products, I will ask you to let us know what OS are you using and also your browser. You can try to set the class ps-child into the modal: <div class="modal ps-child">
.
I tried to reproduce this issue and it works just fine:
Hope that information helps you. Please let us know if we can help you with anything else.
All the best,
Stefan
Hello @groovemen ,
Firstly thanks for answering me and I really enjoyed your work.
I use Ubuntu 18.04 LTS and the machine where the site files are using Ubuntu Server 18.04 LTS and realized that this happens in the Google Chrome browser. In Firefox the scroll bar works fine in modal.
When I applied the "ps-child" class the modal scroll bar worked fine in Google Chrome. I am very grateful for your help 😃 .
Another thing I would like to answer is because when I try to use jQuery, even though it is imported, when I see the browser console it cannot recognize the "$" and the function in jQuery is not executed.
Have you put your script in the "js" stack? I think you have tried use jquery before it was imported in the page.
Thanks
Hello @juan-igor, please see our latest reply. We forgot to tag you.
Thanks