Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong postitioning after orientation change iOS 11 #54

Open
w3development-kn opened this issue Jan 12, 2018 · 3 comments
Open

Wrong postitioning after orientation change iOS 11 #54

w3development-kn opened this issue Jan 12, 2018 · 3 comments

Comments

@w3development-kn
Copy link

After changing the orientation when the modal is present, the image gots a wrong position.

See this screenshot: @https://imgur.com/a/CmFzB

@w3development-kn w3development-kn changed the title Wrong postitioning after orientation change iOS Wrong postitioning after orientation change iOS 11 Jan 12, 2018
@ykokam2
Copy link

ykokam2 commented May 7, 2018

same in android.

@anshnirmal
Copy link

anshnirmal commented Apr 10, 2019

A dirty fix for the issue. I have done this for my android application. Change the time delay from 550 to 1550 worked for me.

File: node_modules\ionic-gallery-modal\index.js
Line number: 472

GalleryModal.prototype.orientationChange = function (event) {
var _this = this;
// TODO: See if you can remove timeout
window.setTimeout(function () {
_this.resize(event);
}, 1550);
};

The updated width and height was not available with a delay of 550 millisecond. It taking a bit time to update orientation change device width and height. Increasing the window.setimeout delay fixed.

I hope the actual implementation should be a listener that should call "resize" event once there is a change applied in device width and height.

@NareshKukreti12
Copy link

NareshKukreti12 commented Aug 5, 2019

Anyone found the solution. Facing the same problem on android devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants