Thibaut Courouble 8 years ago
parent 7e0d60a241
commit c2c26ad576

@ -336,9 +336,6 @@ $.popup = (value) ->
window.open value.href or value, '_blank'
return
$.isTouchScreen = ->
typeof ontouchstart isnt 'undefined'
$.isWindows = ->
navigator.platform?.indexOf('Win') >= 0

@ -32,9 +32,7 @@ class app.views.Mobile extends app.View
super
init: ->
if $.isTouchScreen()
FastClick.attach @body
app.shortcuts.stop()
FastClick.attach @body
$.on @body, 'click', @onClick
$.on $('._home-btn'), 'click', @onClickHome

@ -41,7 +41,7 @@ class app.views.Search extends app.View
return
autoFocus: =>
unless $.isTouchScreen()
unless app.isMobile()
@input.focus() unless document.activeElement is @input
return

@ -95,7 +95,7 @@ class app.views.SearchScope extends app.View
else if not @doc and @input.value
return if event.ctrlKey or event.metaKey or event.altKey or event.shiftKey
if event.which is 9 or # tab
event.which is 32 and (app.isMobile() or $.isTouchScreen()) # space
(event.which is 32 and app.isMobile()) # space
@search @input.value[0...@input.selectionStart]
$.stopEvent(event) if @doc
return

@ -10,7 +10,7 @@ class app.views.Sidebar extends app.View
escape: 'onEscape'
init: ->
@addSubview @hover = new app.views.SidebarHover @el unless app.isMobile() or $.isTouchScreen()
@addSubview @hover = new app.views.SidebarHover @el unless app.isMobile()
@addSubview @search = new app.views.Search
@search

@ -14,6 +14,7 @@ body {
color: $textColor;
word-wrap: break-word;
overflow-wrap: break-word;
touch-action: manipulation;
-webkit-tap-highlight-color: rgba(black, 0);
-webkit-touch-callout: none;
-webkit-text-size-adjust: 100%;

Loading…
Cancel
Save