Skip to content

No height because of #swipeview-masterpage position absolute #74

@tominhuang

Description

@tominhuang

I've seen that wrapper are 100% height and width.

div.style.cssText = 'position:relative;top:0;height:100%;width:100%;' + cssVendor + 'transition-duration:0;' + cssVendor + 'transform:translateZ(0);' + cssVendor + 'transition-timing-function:ease-out';

The wrapper's content, i.e., masterpages, are absolute.

div.style.cssText = cssVendor + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;left:' + i*100 + '%';

In my use case, I put some images set with width and height (like 100px) within #masterpages, and the wrapper's height is not stretched (0px maybe) in HTML,
All the content I put are not visible. I need to specify the wrapper height manually. That's inconvenient.

A quick fix for this may be:

                div.style.cssText = cssVendor + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;left:' + i*100 + '%';
+ //overwrite absolute
+ if (i == -1) {
+               div.style.cssText = div.style.cssText + ';position:relative;'
+ }
                if (!div.dataset) div.dataset = {};

add below line 82

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions