locked
Is there a way to programmatically close the search charm pane? RRS feed

  • Question

  • ...after the user searched for something?
    Wednesday, May 15, 2013 11:25 AM

Answers

  • According to this thread calling window.focus(); should close the charm.  Another solution from this thread is:

    var e = document.createEvent('MouseEvent');
    e.initMouseEvent('click', false, false, null, null, 0, 0, 0, 0, false, false, false, false, 0, null);
    document.getElementsByClassName('win-appbarclickeater')[0].dispatchEvent(e);

    Wednesday, May 15, 2013 2:06 PM

All replies

  • According to this thread calling window.focus(); should close the charm.  Another solution from this thread is:

    var e = document.createEvent('MouseEvent');
    e.initMouseEvent('click', false, false, null, null, 0, 0, 0, 0, false, false, false, false, 0, null);
    document.getElementsByClassName('win-appbarclickeater')[0].dispatchEvent(e);

    Wednesday, May 15, 2013 2:06 PM
  • Thanks, I will try.
    Thursday, May 16, 2013 12:24 PM