Opened 7 years ago

Closed 6 years ago

#15126 closed enhancement (wontfix)

use case insensitive match for matching themes in deviceTheme

Reported by: ben hockey Owned by: ykami
Priority: undecided Milestone: tbd
Component: DojoX Mobile Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

when setting the device theme via djConfig.mblUserAgent if the value doesn't match the exact case of the value used in the thememap (eg user enters "android" instead of "Android") then the theme is not applied. if the regular expression generated from the value in thememap was case insensitive then it would allow the user to use whichever case they wanted in the config.

change

if(ua.match(new RegExp(m[i][0]))){

to

if(ua.match(new RegExp(m[i][0], "i"))){

Change History (2)

comment:1 Changed 7 years ago by ykami

I'm a bit afraid that it might increase the possibility of false match. For example, I'm not 100% certain that if no UA strings (except the one for iPad) have character sequence i-p-a-d. Also, custom theme names will have to be chosen more carefully.

comment:2 Changed 6 years ago by ykami

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.