History

Scroll to top when tapping mobile settings tabs

Thibaut Courouble committed 9 years ago

Commit 22cbb331 parent 74d7ad01 file · +2 −0Browse files

Unified · Split

assets/javascripts/views/layout/mobile.coffee+2−0
@@ -111,6 +111,7 @@ class app.views.Mobile extends app.View · 110 unmodified lines
111111 return
112112
113113 showDocPicker: ->
114+ window.scrollTo 0, 0
114115 @docPickerTab.classList.add 'active'
115116 @settingsTab.classList.remove 'active'
116117 @docPicker.style.display = 'block'
@@ -118,6 +119,7 @@ class app.views.Mobile extends app.View · 1 unmodified line
118119 return
119120
120121 showSettings: ->
122+ window.scrollTo 0, 0
121123 @docPickerTab.classList.remove 'active'
122124 @settingsTab.classList.add 'active'
123125 @docPicker.style.display = 'none'