Skip to content

Commit

Permalink
Deactivate Bootstrap 2 modal dialogs (#4839)
Browse files Browse the repository at this point in the history
* Deactivate Bootstrap 2 modal dialogs

Co-authored-by: Étienne Trimaille <[email protected]>

---------

Co-authored-by: Étienne Trimaille <[email protected]>
  • Loading branch information
mdouchin and Gustry authored Oct 9, 2024
1 parent 1ff1746 commit 20eee3f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lizmap/www/assets/css/map.css
Original file line number Diff line number Diff line change
Expand Up @@ -3702,3 +3702,20 @@ div.lizmap-features-table.popup-displayed div.lizmap-features-table-container +
.hide {
display: none;
}


/* Deactivate the OLD bootstrap-2 modal
This is needed for LWC >=3.9 and the migration to bootstrap 5
This prevent old JS scripts to make the map unusable
ex: https://github.com/3liz/lizmap-javascript-scripts/blob/master/library/ui/popup_metadata_info/popup.js
We hide modal if it has a direct modal-header child div (Bootstrap 2)
Bootstrap 5 needs a div.modal-dialog which itself
contains a modal-header and modal-body
so the new modal will not be hidden
These lines will be removed in the future, when the minimum target version will be 3.9
*/
#lizmap-modal:has(> div.modal-header),
#lizmap-modal:has(> div.modal-header) ~ div.modal-backdrop {
display: none !important;
}

0 comments on commit 20eee3f

Please sign in to comment.