[common] Correct searchbar
This commit is contained in:
parent
7a4bd9484c
commit
d899bcabbf
|
@ -93,41 +93,39 @@ class SearchView extends Component {
|
||||||
const $$ = Dom7;
|
const $$ = Dom7;
|
||||||
|
|
||||||
$$(document).on('page:init', (e, page) => {
|
$$(document).on('page:init', (e, page) => {
|
||||||
if ( page.name == 'home' ) {
|
this.searchbar = f7.searchbar.create({
|
||||||
this.searchbar = f7.searchbar.create({
|
el: '.searchbar',
|
||||||
el: '.searchbar',
|
customSearch: true,
|
||||||
customSearch: true,
|
expandable: true,
|
||||||
expandable: true,
|
backdrop: false,
|
||||||
backdrop: false,
|
on: {
|
||||||
on: {
|
search: (bar, curval, prevval) => {
|
||||||
search: (bar, curval, prevval) => {
|
},
|
||||||
},
|
enable: this.onSearchbarShow.bind(this, true),
|
||||||
enable: this.onSearchbarShow.bind(this, true),
|
disable: this.onSearchbarShow.bind(this, false)
|
||||||
disable: this.onSearchbarShow.bind(this, false)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// function iOSVersion() {
|
|
||||||
// var ua = navigator.userAgent;
|
|
||||||
// var m;
|
|
||||||
// return (m = /(iPad|iPhone|iphone).*?(OS |os |OS\_)(\d+((_|\.)\d)?((_|\.)\d)?)/.exec(ua)) ? parseFloat(m[3]) : 0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
const $editor = $$('#editor_sdk');
|
|
||||||
// const $replaceLink = $$('#replace-link');
|
|
||||||
|
|
||||||
if (false /* iOSVersion < 13 */) {
|
|
||||||
// $editor.on('mousedown touchstart', this.onEditorTouchStart.bind(this));
|
|
||||||
// $editor.on('mouseup touchend', this.onEditorTouchEnd.bind(this));
|
|
||||||
} else {
|
|
||||||
// $editor.on('pointerdown', this.onEditorTouchStart.bind(this));
|
|
||||||
// $editor.on('pointerup', this.onEditorTouchEnd.bind(this));
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$editor.on('pointerdown', this.onEditorTouchStart.bind(this));
|
// function iOSVersion() {
|
||||||
$editor.on('pointerup', this.onEditorTouchEnd.bind(this));
|
// var ua = navigator.userAgent;
|
||||||
// $replaceLink.on('click', this.onReplaceHold.bind(this));
|
// var m;
|
||||||
|
// return (m = /(iPad|iPhone|iphone).*?(OS |os |OS\_)(\d+((_|\.)\d)?((_|\.)\d)?)/.exec(ua)) ? parseFloat(m[3]) : 0;
|
||||||
|
// }
|
||||||
|
|
||||||
|
const $editor = $$('#editor_sdk');
|
||||||
|
// const $replaceLink = $$('#replace-link');
|
||||||
|
|
||||||
|
if (false /* iOSVersion < 13 */) {
|
||||||
|
// $editor.on('mousedown touchstart', this.onEditorTouchStart.bind(this));
|
||||||
|
// $editor.on('mouseup touchend', this.onEditorTouchEnd.bind(this));
|
||||||
|
} else {
|
||||||
|
// $editor.on('pointerdown', this.onEditorTouchStart.bind(this));
|
||||||
|
// $editor.on('pointerup', this.onEditorTouchEnd.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$editor.on('pointerdown', this.onEditorTouchStart.bind(this));
|
||||||
|
$editor.on('pointerup', this.onEditorTouchEnd.bind(this));
|
||||||
|
// $replaceLink.on('click', this.onReplaceHold.bind(this));
|
||||||
});
|
});
|
||||||
|
|
||||||
this.onSettingsClick = this.onSettingsClick.bind(this);
|
this.onSettingsClick = this.onSettingsClick.bind(this);
|
||||||
|
|
Loading…
Reference in a new issue