twitter bootstrap dropdown doesn't toggle closed when it should

后端 未结 8 1029
伪装坚强ぢ
伪装坚强ぢ 2021-02-10 00:16

Oh man, I\'ve been tearing my hair out over this. 4 hours on a dropdown.

I\'m using Twitter Bootstrap.

The fixed nav at the top has a dropdown, pretty standard s

8条回答
  •  梦毁少年i
    2021-02-10 01:09

    You can also add propagate click event from the parent page with this code (fixed the same issue for me):

    var myFrameContents = document.getElementById("frame").contentWindow.document;
    myFrameContents.body.addEventListener("click", function() {
        document.body.click();
    });
    

提交回复
热议问题