mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
set button css by attrs
This commit is contained in:
@@ -301,7 +301,10 @@ export class Platform {
|
||||
* @returns {boolean} TODO
|
||||
*/
|
||||
testNavigatorPlatform(navigatorPlatformExpression) {
|
||||
return navigatorPlatformExpression.test(this._bPlt || '');
|
||||
if (navigatorPlatformExpression && this._bPlt) {
|
||||
let rgx = new RegExp(navigatorPlatformExpression, 'i');
|
||||
return rgx.test(this._bPlt);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,7 +52,7 @@ Platform.register({
|
||||
// however, under-powered devices shouldn't use ripple
|
||||
// if this a linux device, and is using Android Chrome v36 (Android 5.0)
|
||||
// or above then use ripple, otherwise do not use a ripple effect
|
||||
if (p.testNavigatorPlatform('/linux/i')) {
|
||||
if (p.testNavigatorPlatform(/linux/i)) {
|
||||
let chromeVersion = p.matchUserAgentVersion(/Chrome\/(\d+).(\d+)?/);
|
||||
if (chromeVersion) {
|
||||
// linux android device using modern android chrome browser gets ripple
|
||||
|
||||
Reference in New Issue
Block a user