title: Close dropdown menu on scroll
body: <p>I am currently working on a project using <code>Ant Design</code> and on one page I have a dropdown Menu. When you click on the menu it opens the dropdown but if you scroll down the menu still keeps open. I wish to implement that when the user is scrolling down the menu closes.</p>
  
  <p>I tried to implement a <code>handleScroll()</code> function in order to use is with the provided prop <code>onVisibleChange</code>. However I am not sure what I should add in the function to get it work. </p>
  
  <pre><code>handleScroll = (e) =&gt; {
  window.addEventListener('scroll', () =&gt; {
  console.log('scrolling');
   })
  }
  
  &lt;Dropdown onVisibleChange={visible =&gt; this.handleScroll( 
  console.log(visible)) } trigger={['click']} overlay={
    &lt;Menu&gt;
      &lt;Menu.Item key="1"
        onClick={() =&gt; this.scrollTo(this.whyRef)}&gt;
        &lt;Icon icon={u1F427} /&gt; &lt;strong&gt;WHY&lt;/strong&gt;
        &lt;/Menu.Item&gt;
       &lt;/Menu&gt;
     }&gt;
   &lt;Dropdown&gt;
  </code></pre>