jQuery Token Input (tokenize input) is not working on modal popup, list hidden under popup

前端 未结 2 1714
悲哀的现实
悲哀的现实 2021-01-12 01:40

I am using a modal popup up control in jQuery, the popup has an input text powered by jQuery Tokenize input plugin. The problem is when i type something on modal popup text

相关标签:
2条回答
  • 2021-01-12 02:22

    It works by setting the z-index manually:

    $(".token-input-dropdown").css("z-index","9999")
    

    The function given in https://github.com/loopj/jquery-tokeninput/issues/190 does not work in my coffeescript:

    $('#book_author_tokens').tokenInput('/authors.json', { 
        zindex: 9999
      });
    
    0 讨论(0)
  • 2021-01-12 02:23

    I think that a better solution is to add it to the css file (instead of doing it via js):

    div.token-input-dropdown-facebook {           
       z-index: 11001 !important;
    }
    

    Of course, drop the "-facebook" suffix if you're using the default theme.

    0 讨论(0)
提交回复
热议问题