What's new

Welcome to xCrud Community - Data Management and extended PHP CRUD

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

modal lock body scroll

pierluisdj

New member
Joined
Nov 9, 2022
Messages
13
Reaction score
0
Points
1
Location
Italy
Good morning,
there is a bug in the modal mode that i can't solve.
The bug is present also in the online demo.

If I click on someone of button (the rendered button in modal detail view), the modal view execute the relative code but block the vertical scrolling of the body list.
I can only use the oriz. scrolling, reopen the detail modal view and close the modal by the (x) in the corner.
The script call the data-dismiss='modal' and the body scrolling return to work...

Full procedure:
open page with $xcrud->is_edit_modal(true) ...
open one element in detail view...
click on "back" button...

(boby scrolling bug active)

for exit:
reopen one element in detail view...
click on "x" in the top right corner... that "x" is associated to data-dismiss

(body scrolling fixed)


How is possible fix this problem?
 

pierluisdj

New member
Joined
Nov 9, 2022
Messages
13
Reaction score
0
Points
1
Location
Italy
CORRECT:

add in xcrud.js after

** request: function(container, data, success_callback) { **

if (data.task == "list" || data.after == "list"){
$("body").removeClass("modal-open");
}
else{
$('.modal-open').css({
overflow: 'hidden'
});
}
 
Top Bottom