Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Position dropzone #1002

Merged
merged 6 commits into from
Dec 14, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions changelog/unreleased/dropzone-positionming
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Bugfix: positioning of dropzone

switch oc-dropzone positioning from fixed to absolute, fixed always orientates by the viewport which means it always covers the entire screen.
This is something we couldn't know and the decision should be left to the consuming app.
phil-davis marked this conversation as resolved.
Show resolved Hide resolved

instead we use position absolute to just cover the next parent which ist positioned relative or the viewport.
phil-davis marked this conversation as resolved.
Show resolved Hide resolved
In situations where the body is higher or wider then the viewport fixed works better because absolute won't cover the scrollable parts of the content.
phil-davis marked this conversation as resolved.
Show resolved Hide resolved

since oc apps always do scrolling on their own this is no problem
phil-davis marked this conversation as resolved.
Show resolved Hide resolved


https://github.com/owncloud/ocis/issues/1052
9 changes: 4 additions & 5 deletions src/styles/theme/oc-dropzone.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
.oc-dropzone {
@extend .uk-position-fixed;
@extend .uk-position-cover;
@extend .uk-text-center;
@extend .uk-flex;
@extend .uk-flex-center;
@extend .uk-flex-middle;
@extend .uk-position-z-index;

background-color: rgba($global-background, 0.8);
height: calc(100% - (2 * #{$navbar-nav-item-height}));
left: 0;
top: 2 * $navbar-nav-item-height;
width: 100%;
}

.oc-dropzone span {
pointer-events: none;
}
switch oc-dropzone positioning from fixed to absolute, fixed always orientates by the viewport which means it always coveres the entire screen. This is something we could't know and the decision should be left to the consuming app. instead we use position absolute to just cover the next parent which ist positioned relative or the viewport.
phil-davis marked this conversation as resolved.
Show resolved Hide resolved
phil-davis marked this conversation as resolved.
Show resolved Hide resolved
in situations where the body is higher or wider then the viewport fixed works better because absolute won't cover the scrollable parts of the content. since oc apps always do scrolling on their own this is no problem
phil-davis marked this conversation as resolved.
Show resolved Hide resolved