add more delay to toggle article meta-data

- so that double-click selections work better without toggling the meta-data
This commit is contained in:
Felix Niklas 2016-11-23 11:23:23 +01:00
parent e57d2c6c56
commit 1b4fbd6b4c

View file

@ -239,11 +239,12 @@ class ArticleViewItem extends App.ObserverController
toggleMetaWithDelay: (e) =>
# allow double click select
# by adding a delay to the toggle
delay = 120
if @lastClick and +new Date - @lastClick < 80
if @lastClick and +new Date - @lastClick < delay
clearTimeout(@toggleMetaTimeout)
else
@toggleMetaTimeout = setTimeout(@toggleMeta, 80, e)
@toggleMetaTimeout = setTimeout(@toggleMeta, delay, e)
@lastClick = +new Date
toggleMeta: (e) =>