Browse Source

Don't set lastDragValue when the cursor coordinate is 0 (Chrome bug)

Fixes #265.
Thibaut Courouble 10 năm trước cách đây
mục cha
commit
a24a2ce1fe
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      assets/javascripts/views/layout/resizer.coffee

+ 1 - 0
assets/javascripts/views/layout/resizer.coffee

@@ -40,6 +40,7 @@ class app.views.Resizer extends app.View
 
   onDrag: (event) =>
     value = event.pageX
+    return unless value > 0
     @lastDragValue = value
     return if @lastDrag and @lastDrag > Date.now() - 50
     @lastDrag = Date.now()