ionic-gallery-modal icon indicating copy to clipboard operation
ionic-gallery-modal copied to clipboard

Wrong postitioning after orientation change iOS 11

Open w3development-kn opened this issue 7 years ago • 3 comments

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 avatar Jan 12 '18 08:01 w3development-kn

same in android.

ykokam2 avatar May 07 '18 06:05 ykokam2

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.

anshnirmal avatar Apr 10 '19 13:04 anshnirmal

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

NareshKukreti12 avatar Aug 05 '19 06:08 NareshKukreti12