Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#18669 closed defect (fixed)

on iOS9, deviceTheme picks old iOS theme instead of iOS7 theme.

Reported by: Youcef Mammar Owned by: Patrick Ruzand
Priority: undecided Milestone: 1.10.5
Component: DojoX Mobile Version: 1.10.4
Keywords: Cc:
Blocked By: Blocking:

Description

Theme detection is based on the user agent. Under iOS9, here is what the user agent looks like:

Mozilla/5.0 (iPad; CPU OS 9_0 like Mac OS X) AppleWebKit/601.1.17 (KHTML, like Gecko) 
Version/8.0 Mobile/13A175 Safari/600.1.4

We should change deviceTheme to use iOS7 theme when it finds "OS 9_0"

Change History (6)

comment:1 Changed 4 years ago by Youcef Mammar

comment:2 Changed 4 years ago by cjolif

Milestone: tbd1.9.8

comment:3 Changed 4 years ago by Clément Mathieu <clement.mathieu@…>

Resolution: fixed
Status: newclosed

In 828883a258d10ae7732ddddb8a367e29e398be47/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:4 Changed 4 years ago by Clément Mathieu <clement.mathieu@…>

In c6acd8a30563a68595f304b7c261b30c02375dfe/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:5 Changed 4 years ago by cjolif

Milestone: 1.9.81.10.5

comment:6 Changed 4 years ago by Youcef Mammar

For those who haven’t made the update yet, they can detect manually iOS9 and force the theme to iOS7, before loading dojo.

<script>
    var iOS9Detected = /.*iPhone OS 9_0.*/.test(navigator.userAgent) 
         || /.*iPad.+OS 9_0.*/.test(navigator.userAgent);

    window.mblConfig = window.mblConfig || {};

    if (iOS9Detected) {
        window.mblConfig.mblUserAgent= "ios7";
    }
</script>
<!-- then load dojo -->
<script type="text/javascript" src="../deviceTheme.js" data-dojo-config="mblThemeFiles: ['base','Accordion','TabBar','dijit.Calendar']"></script>
<script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: true, mblAlwaysHideAddressBar: true"></script>
Note: See TracTickets for help on using tickets.