File tree 1 file changed +12
-7
lines changed
1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -157,13 +157,18 @@ class WebFileSelectorPlatformView {
157
157
labelElement.style.backgroundColor = 'transparent' ;
158
158
labelElement.style.cursor = 'pointer' ;
159
159
160
- // This is to prevent mobile version of Chrome from
161
- // applying a highlight color when tapped.
162
- if (web.CSS .supports ('-webkit-tap-highlight-color: transparent' )) {
163
- labelElement.attributeStyleMap.set (
164
- '-webkit-tap-highlight-color' ,
165
- 'transparent' .toJS,
166
- );
160
+ try {
161
+ // This is to prevent mobile version of Chrome from
162
+ // applying a highlight color when tapped.
163
+ if (web.CSS .supports ('-webkit-tap-highlight-color: transparent' )) {
164
+ labelElement.attributeStyleMap.set (
165
+ '-webkit-tap-highlight-color' ,
166
+ 'transparent' .toJS,
167
+ );
168
+ }
169
+ } catch (_) {
170
+ // CSS.support() is probably not supported the
171
+ // browser this code is currently running on.
167
172
}
168
173
169
174
// Add HTML input element
You can’t perform that action at this time.
0 commit comments