jquery - Bootstrap select - using data-container="body" breaks functionality -
i having problem bootstrap select going under div, , find solution solved in following question: bootstrap-select opens option under div
the solution suggests adding data-container="body" bootstrap select, , solved problem caused side effects on bootstrap functionality:
- when
selectopened, clicking outside scope won't close it. - when
selectopened, clicking onselect(the original box) won't close it. - when trying functionality described on 1 , 2,
selectgets stuck , clicking on validoptionwon't closeselectnow.
without using data-container="body" on select none of happens, have original problem. need if has idea happening.
i've altered line of code has solved problem of select menus not closing once opened.
bootstrap-select.js line 1002.
original code
.toggleclass('open', !$this.hasclass('open')) my altered code
.toggleclass('open') someone else may able weigh in on , explain why.
Comments
Post a Comment