-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fixed] swipe event on some Android browsers, resolves #25
tested on: - Mozilla/5.0 (Linux; U; Android 5.0.1; zh-CN; GT-I9500 Build/LRX22C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 UCBrowser/10.8.5.689 U3/0.8.0 Mobile Safari/534.30
- Loading branch information
minwe
committed
May 20, 2016
1 parent
22eef39
commit 6977df2
Showing
4 changed files
with
46 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// UC browser UI controller | ||
|
||
const controller = navigator && navigator.control || {}; | ||
|
||
/** | ||
* ucUIControl | ||
* @param {string} feature - 'gesture' or 'longpressMenu' | ||
* @param {boolean} state | ||
* @returns {boolean} | ||
*/ | ||
function ucUIControl(feature, state) { | ||
return controller[feature] && controller[feature](state); | ||
} | ||
|
||
// disable gesture | ||
ucUIControl('gesture', false); | ||
|
||
export default ucUIControl |