emvecchi commited on
Commit
b65a607
1 Parent(s): 10817d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -279,11 +279,9 @@ def navigate(index_change):
279
  # only works consistently if done before rerun
280
  js = '''
281
  <script>
282
- document.addEventListener('DOMContentLoaded', function() {
283
  var body = window.parent.document.querySelector(".main");
284
  body.scrollTop = 0;
285
  window.scrollY = 0;
286
- });
287
  </script>
288
  '''
289
  st.components.v1.html(js, height=0)
@@ -307,8 +305,8 @@ def navigate(index_change):
307
  height=0
308
  )
309
 
310
- st.experimental_rerun()
311
- #st.rerun()
312
 
313
  def show_field(f: Field, index: int, data_collected):
314
  if f.type not in INPUT_FIELD_DEFAULT_VALUES.keys():
 
279
  # only works consistently if done before rerun
280
  js = '''
281
  <script>
 
282
  var body = window.parent.document.querySelector(".main");
283
  body.scrollTop = 0;
284
  window.scrollY = 0;
 
285
  </script>
286
  '''
287
  st.components.v1.html(js, height=0)
 
305
  height=0
306
  )
307
 
308
+ #st.experimental_rerun()
309
+ st.rerun()
310
 
311
  def show_field(f: Field, index: int, data_collected):
312
  if f.type not in INPUT_FIELD_DEFAULT_VALUES.keys():