tabs: use fake-click event instead of native to prevent traversing gesture from breaking it
This commit is contained in:
parent
d09021ebe3
commit
17bf662db5
1 changed files with 3 additions and 3 deletions
|
|
@ -5,7 +5,7 @@ var sidepanel = require('./sidepanel').init
|
|||
|
||||
// Tabs...
|
||||
var tabs = function() {
|
||||
$('#container').click(function(e){
|
||||
$('#container').on('fake-click', function(e){
|
||||
var link = e.target
|
||||
|
||||
if (!link.hasAttribute('data-tab') || link.classList.contains('on')) return
|
||||
|
|
@ -22,13 +22,13 @@ var tabs = function() {
|
|||
|
||||
|
||||
$(id).find('li[data-tab]:first-child, li.parent + li[data-tab]').each(function(){
|
||||
if (!$(this).siblings('.on').length) $(this).click()
|
||||
if (!$(this).siblings('.on').length) $(this).trigger('fake-click')
|
||||
})
|
||||
|
||||
$(window).resize()
|
||||
|
||||
})
|
||||
$('li[data-tab]').first().click()
|
||||
$('li[data-tab]').first().trigger('fake-click')
|
||||
}
|
||||
|
||||
// zoom zoom
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue