javascript - Mobile Safari doesn't trigger "orientationchange"—how to debug? -
i have website (http://7db.9ed.myftpupload.com/
) display content tailored orientation. when in landscape mode, should display wide slideshow, when in portrait should switch thin slideshow.
i'm attempting use "orientationchange" event apple specifies in safari web content guide.
jquery( document ).ready( function() { window.addeventlistener("orientationchange", function() { console.log("the orientation of device " + screen.orientation.angle); placeslideshow(); }, false); });
this works without hitch in chrome's ios simulator. but, in both osx hardware simulator , on live ios device, nothing happens on orientation change. it's not placeslideshow
function—safari isn't triggering orientation change @ all.
at loss troubleshoot this—where start?
it turns out issue console.log
call had added in. safari not recognize property screen.orientation.angle,
, reason unknown me, call managed torpedo entire callback.
i removed log call , works normally.
Comments
Post a Comment