summaryrefslogtreecommitdiff
path: root/addons/web/static/src/scss/modal.scss
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2018-12-05 13:57:22 +0100
committerqsm-odoo <qsm@odoo.com>2018-12-06 11:13:05 +0100
commitc59a7e1b800ab1b8d1c9b106ff5c2e377db6fa2f (patch)
tree2cc259fa769cf2571a4096e68761adeb7a8e163f /addons/web/static/src/scss/modal.scss
parente1f9499d2672fb0a346f8ac74552f038f5204a64 (diff)
[IMP] web: add better modal scrolling for frontend
Odoo overrides the modal behavior to make the modal-body scroll instead of the <body/> when the modal would overflow the window. This was however only done for "technical" modals i.e. the ones of the Odoo UI, not the website/portal ones which are displayed to visitors. This commit makes the behavior active for all bootstrap modals wherever bootstrap is used.
Diffstat (limited to 'addons/web/static/src/scss/modal.scss')
-rw-r--r--addons/web/static/src/scss/modal.scss50
1 files changed, 13 insertions, 37 deletions
diff --git a/addons/web/static/src/scss/modal.scss b/addons/web/static/src/scss/modal.scss
index f02765c25c4..52c3100df31 100644
--- a/addons/web/static/src/scss/modal.scss
+++ b/addons/web/static/src/scss/modal.scss
@@ -47,44 +47,20 @@
}
}
+ @include media-breakpoint-up(sm) {
+ .modal-dialog .modal-content .modal-body.o_dialog_error {
+ overflow: visible;
+ display: flex;
+ flex-flow: column nowrap;
+
+ > .alert, > button {
+ flex: 0 0 auto;
+ }
- @include media-breakpoint-up(md) {
- .modal-dialog {
- height: 100%;
- padding: 30px 0;
- margin: 0 auto;
-
- .modal-content {
- max-height: 100%;
- display: flex;
- flex-flow: column nowrap;
-
- .modal-header, .modal-footer {
- flex: 0 0 auto;
- }
-
- .modal-body {
- overflow: auto;
- // fix iOS issue https://github.com/scottjehl/Device-Bugs/issues/8
- -webkit-transform: translate3d(0, 0, 0);
- min-height: 0;
-
- &.o_dialog_error {
- overflow: visible;
- display: flex;
- flex-flow: column nowrap;
-
- > .alert, > button {
- flex: 0 0 auto;
- }
-
- > .o_error_detail {
- flex: 1 1 auto;
- min-height: 0;
- overflow: auto;
- }
- }
- }
+ > .o_error_detail {
+ flex: 1 1 auto;
+ min-height: 0;
+ overflow: auto;
}
}
}