Changeset 66819 in webkit
- Timestamp:
- Sep 6, 2010 2:56:56 AM (14 years ago)
- Location:
- trunk/WebKitSite
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitSite/ChangeLog
r66233 r66819 1 2010-09-06 Robin Qiu <robin.qiu@torchmobile.com.cn> 2 3 Reviewed by Adam Barth. 4 5 https://bugs.webkit.org/show_bug.cgi?id=43982 6 This js file seems to be a popular script for detecting mobile WebKit but 7 it has a flaw that makes it fail on Android and BlackBerry. 8 9 The issue is that it looks for "Mobile/" but Android and BlackBerry 10 use "Mobile" with no numbering after it. 11 Changed RegExp pattern " Mobile/" to " Mobile\\b". 12 13 * misc/WebKitDetect.js: 14 (WebKitDetect.isMobile): 15 1 16 2010-08-27 Darin Adler <darin@apple.com> 2 17 -
trunk/WebKitSite/misc/WebKitDetect.js
r25385 r66819 102 102 WebKitDetect.isMobile = function isMobile() 103 103 { 104 return WebKitDetect.isWebKit() && RegExp(" Mobile /").test(navigator.userAgent);104 return WebKitDetect.isWebKit() && RegExp(" Mobile\\b").test(navigator.userAgent); 105 105 } 106 106
Note: See TracChangeset
for help on using the changeset viewer.