docute icon indicating copy to clipboard operation
docute copied to clipboard

Hamburger menu not working when sidebar is false

Open yysun opened this issue 8 years ago • 2 comments

An error can be found in browser dev-tool console: TypeError: Cannot read property 'classList' of null at a. (docute.js:13926) at Ci.run (vue.esm.js:2531) at yt (vue.esm.js:2311) at Array. (vue.esm.js:505) at t (vue.esm.js:454)

yysun avatar Mar 20 '17 19:03 yysun

Can you provide the repro steps?

egoist avatar Mar 21 '17 15:03 egoist

The HTML below is used, which sets the sidebar to be false.

<html>
<head>...</head>
<body>
  <div id="app"></div>
  <script src="https://unpkg.com/docute@3/dist/docute.js"></script>
  <script>
    docute.init({
      sidebar: false,
      nav: [
        {title: 'Home', path: '/'},
        {title: 'Learn', path: '/git'},
        {title: 'Github', path: 'https://github.com/yysun/git-tools'}
      ]
    })
  </script>
</body>
</html>

After loaded in chrome, make the window smaller util the hamburger menu shows up on top of screen. Then click the hamburger menu. Nothing changes in UI, but an error shows up in console.

step1

step2

yysun avatar Mar 21 '17 17:03 yysun