Commits

Julian Brost committed 8cb117c

Added return false to onclick-events in TOC to prevent jumping to the top of the page.

Comments (0)

Files changed (1)

MoinMoin/converter/html_out.py

                 headtogglelink = html.a(attrib={
                                          html.class_: 'showhide',
                                          html.href_: '#',
-                                         html.onclick_: "$('.table-of-contents ol').toggle()",
+                                         html.onclick_:
+                                            "$('.table-of-contents ol').toggle();return false;",
                                      },
                                      children=[('[+]'), ])
                 elem_h = html.div(attrib={html.class_: 'table-of-contents-heading'},
                         stack_push(html.li({html.id_: 'li%s' % id}))
                     togglelink = html.a(attrib={
                                          html.href_: "#",
-                                         html.onclick_: "$('#li%s ol').toggle()" % id,
+                                         html.onclick_: 
+                                            "$('#li%s ol').toggle();return false;" % id,
                                          html.class_: 'showhide',
                                      },
                                      children=["[+]", ])