[jbosstools-issues] [JBoss JIRA] (JBIDE-10280) BrowserSim: simulate orientationchange event
Yahor Radtsevich (Resolved) (JIRA)
jira-events at lists.jboss.org
Mon Dec 5 15:04:40 EST 2011
[ https://issues.jboss.org/browse/JBIDE-10280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yahor Radtsevich resolved JBIDE-10280.
--------------------------------------
Resolution: Done
I have added two button to rotate the browser:
!screenshot-1.png|thumbnail!
These buttons change the browser dimensions and fire the orientationchange event when pressed.
To test the behavior, the following html page may be used (you can test it here: http://jsbin.com/oholuv/2 ):
{code:xml}
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Orientation Event Support Test</title>
<script>
var supportsOrientationChange = "onorientationchange" in window,
orientationEvent = supportsOrientationChange ? "orientationchange" : "resize";
alert("supportsOrientationChange: " + supportsOrientationChange
+ "\norientationEvent: " + orientationEvent
+ "\nwindow.orientation: " + window.orientation);
window.addEventListener(orientationEvent, function() {
alert('HOLY ROTATING SCREENS BATMAN:' + window.orientation + " " + screen.width);
}, false);
</script>
</head>
<body>
<p id="hello">Orientation Event Support Test</p>
</body>
</html>
{code}
> BrowserSim: simulate orientationchange event
> --------------------------------------------
>
> Key: JBIDE-10280
> URL: https://issues.jboss.org/browse/JBIDE-10280
> Project: Tools (JBoss Tools)
> Issue Type: Feature Request
> Components: Visual Page Editor core
> Reporter: Yahor Radtsevich
> Assignee: Yahor Radtsevich
> Fix For: 3.3.0.M5
>
> Attachments: screenshot-1.png
>
>
> Add simulation of the orientationchange event.
> Also see http://stackoverflow.com/questions/1649086/detect-rotation-of-android-phone-in-the-browser-with-javascript
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list