【问题标题】:can not dropdown when summernote on the boostrap modal引导模式上的summernote时无法下拉
【发布时间】:2016-11-05 21:00:08
【问题描述】:

我在bootstrap modal上使用summernote。但是当点击工具栏上的下拉项时,下拉菜单没有显示在正确的位置,甚至没有退出下拉DOM。我给你看下图: enter image description here

我在summernote github问题列表和stackoverflow中搜索了很长时间。我尝试添加“dialogsInBody:true”,但没有工作。任何人都可以帮助我解决这个问题。谢谢!

【问题讨论】:

    标签: html css twitter-bootstrap summernote


    【解决方案1】:

    使用 $('.dropdown-toggle').dropdown();

    【讨论】:

    • 你能扩展一下吗?
    【解决方案2】:

    试试这个。在这里工作正常。

    callbacks: {
            onInit: function() {
                //when inside a modal, re-link the dropdown
                var thisNote = $(this);
    
                if(thisNote.closest('.modal').length>0){
                    thisNote.next().find('.dropdown-toggle').dropdown();
                }
    
            }
        }
    

    【讨论】:

      猜你喜欢
      • 2019-06-16
      • 2015-01-08
      • 2015-09-18
      • 1970-01-01
      • 1970-01-01
      • 2013-05-20
      • 2018-02-23
      • 1970-01-01
      • 2018-12-08
      相关资源
      最近更新 更多