0){i.find(":text, :checkbox, :radio").each(function(t,i){var r=n(i),u=r.attr("id");u||r.attr("id",n.getUID())});var e=i.html(),r=n("body").addClass("bb-printview-open"),u=n("<\/div>").addClass("bb-printview").html(e).appendTo(r);u.find(":input").each(function(t,i){var r=n(i),u=r.attr("id");r.attr("type")==="checkbox"?r.prop("checked",n("#"+u).prop("checked")):r.val(n("#"+u).val())});window.setTimeout(function(){window.print();r.removeClass("bb-printview-open");u.remove()},50)}else window.setTimeout(function(){window.print()},50)}})}(jQuery),function(n){n.extend({bb_reconnect:function(){var t=window.setInterval(function(){var i=n("#components-reconnect-modal"),r;if(i.length>0&&(r=i.attr("class"),r==="components-reconnect-show")){window.clearInterval(t);async function n(){await fetch("");location.reload()}n();setInterval(n,5e3)}},2e3)}})}(jQuery),function(n){n.extend({bb_resize_monitor:function(t,i){var r=n.bb_get_responsive(),u=function(){var u=r;r=n.bb_get_responsive();u!==r&&(u=r,t.invokeMethodAsync(i,r))};return window.attachEvent?window.attachEvent("onresize",u):window.addEventListener&&window.addEventListener("resize",u,!0),r},bb_get_responsive:function(){return window.getComputedStyle(document.body,":before").content.replace(/\"/g,"")}})}(jQuery),function(n){n.extend({bb_ribbon:function(n,t,i){window.bb_ribbons===undefined&&(window.bb_ribbons={});window.bb_ribbons[n]={obj:t,method:i}}});n(function(){n(document).on("click",function(t){var u=n(t.target),i=n(".ribbon-tab"),r;i.hasClass("is-expand")&&(r=u.closest(".ribbon-tab").length===0,r&&i.toArray().forEach(function(n){var i=n.id,t;i&&(t=window.bb_ribbons[i],t&&t.obj.invokeMethodAsync(t.method))}))})})}(jQuery),function(n){n.extend({bb_row:function(t){var i=n(t);i.grid()}})}(jQuery),function(n){n.extend({bb_select:function(t,i,r){var u=n(t),o=u.find(".dropdown-toggle"),e=u.find("input.search-text"),f=function(n){var i=n.find(".dropdown-menu"),t=i.children(".preActive");if(t.length===0&&(t=i.children(".active"),t.addClass("preActive")),t.length===1){var u=i.innerHeight(),f=t.outerHeight(),e=t.index()+1,r=11+f*e-u;r>=0?i.scrollTop(r):i.scrollTop(0)}};u.on("show.bs.dropdown",function(n){u.find(".form-select").prop("disabled")&&n.preventDefault()});u.on("shown.bs.dropdown",function(){e.length>0&&e.focus();f(n(this))});u.on("keyup",function(t){var u,o,e,s,h,c;t.stopPropagation();u=n(this);u.find(".dropdown-toggle").hasClass("show")&&(o=u.find(".dropdown-menu.show > .dropdown-item").not(".disabled, .search"),e=o.filter(function(t,i){return n(i).hasClass("preActive")}),o.length>1&&(t.key==="ArrowUp"?(e.removeClass("preActive"),s=e.prev().not(".disabled, .search"),s.length===0&&(s=o.last()),s.addClass("preActive"),f(u)):t.key==="ArrowDown"&&(e.removeClass("preActive"),h=e.next().not(".disabled, .search"),h.length===0&&(h=o.first()),h.addClass("preActive"),f(u))),t.key==="Enter"&&(u.find(".show").removeClass("show"),c=e.index(),u.find(".search").length>0&&c--,i.invokeMethodAsync(r,c)))});u.on("click",".dropdown-item.disabled",function(n){n.stopImmediatePropagation()})}})}(jQuery),function(n){n.extend({bb_slider:function(t,i,r){var f=n(t),h=f.find(".disabled").length>0;if(!h){var e=0,o=0,u=0,s=f.innerWidth();f.find(".slider-button-wrapper").drag(function(n){s=f.innerWidth();e=n.clientX||n.touches[0].clientX;o=parseInt(f.attr("aria-valuetext"));f.find(".slider-button-wrapper, .slider-button").addClass("dragging")},function(n){var t=n.clientX||n.changedTouches[0].clientX;u=Math.ceil((t-e)*100/s)+o;isNaN(u)&&(u=0);u<=0&&(u=0);u>=100&&(u=100);f.find(".slider-bar").css({width:u.toString()+"%"});f.find(".slider-button-wrapper").css({left:u.toString()+"%"});f.attr("aria-valuetext",u.toString());i.invokeMethodAsync(r,u)},function(){f.find(".slider-button-wrapper, .slider-button").removeClass("dragging");i.invokeMethodAsync(r,u)})}}})}(jQuery),function(n){n.extend({bb_split:function(t){var i=n(t),f=i.innerWidth(),e=i.innerHeight(),u=0,r=0,o=0,s=0,h=!i.children().hasClass("is-horizontal");i.children().children(".split-bar").drag(function(n){f=i.innerWidth();e=i.innerHeight();h?(s=n.clientY||n.touches[0].clientY,u=i.children().children(".split-left").innerHeight()*100/e):(o=n.clientX||n.touches[0].clientX,u=i.children().children(".split-left").innerWidth()*100/f);i.toggleClass("dragging")},function(n){var t,c;h?(t=n.clientY||n.changedTouches[0].clientY,r=Math.ceil((t-s)*100/e)+u):(c=n.clientX||n.changedTouches[0].clientX,r=Math.ceil((c-o)*100/f)+u);r<=0&&(r=0);r>=100&&(r=100);i.children().children(".split-left").css({"flex-basis":r.toString()+"%"});i.children().children(".split-right").css({"flex-basis":(100-r).toString()+"%"});i.attr("data-split",r)},function(){i.toggleClass("dragging")})}})}(jQuery),function(n){n.extend({bb_tab:function(t){var i=n(t),r=window.setInterval(function(){i.is(":visible")&&(window.clearInterval(r),i.lgbTab("active"))},200)}})}(jQuery),function(n){n.extend({bb_table_search:function(t,i,r,u){n(t).data("bb_table_search",{obj:i,searchMethod:r,clearSearchMethod:u})},bb_table_row_hover:function(t){var i=t.find(".table-excel-toolbar"),r=t.find("tbody > tr").each(function(t,r){n(r).hover(function(){var t=n(this).position().top;i.css({top:t+"px",display:"block"})},function(){i.css({top:top+"px",display:"none"})})})},bb_table_resize:function(t){var u=t.find(".col-resizer");if(u.length>0){var f=function(t){var u=n(this),i=u.closest("th");t?i.addClass("border-resize"):i.removeClass("border-resize");var r=i.index(),f=i.closest(".table-resize").find("tbody"),e=f.find("tr").each(function(){var i=n(this.children[r]);t?i.addClass("border-resize"):i.removeClass("border-resize")});return r},i=0,e=0,r=0,o=0;u.each(function(){n(this).drag(function(u){r=f.call(this,!0);var s=t.find("table colgroup col")[r].width;i=s?parseInt(s):n(this).closest("th").width();e=n(this).closest("table").width();o=u.clientX},function(u){t.find("table colgroup").each(function(t,f){var l=n(f).find("col")[r],c=u.clientX-o,s,h;l.width=i+c;s=n(f).closest("table");h=e+c;s.parent().hasClass("table-fixed-header")?s.width(h):f.parentNode.style.width=h-6+"px"})},function(){f.call(this,!1)})})}},bb_table_load:function(t,i){var u=n(t),r=u.find(".table-loader");i==="show"?r.addClass("show"):r.removeClass("show")},bb_table_filter_calc:function(t){var c=t.find(".table-toolbar"),l=0,h,e,u;c.length>0&&(l=c.outerHeight(!0));var o=n(this),a=o.position(),v=o.attr("data-field"),f=t.find('.table-filter-item[data-field="'+v+'"]'),i=o.closest("th"),y=i.closest("thead"),p=y.outerHeight(!0)-i.outerHeight(!0),s=i.outerWidth(!0)+i.position().left-f.outerWidth(!0)/2,r=0,w=i.hasClass("fixed");i.hasClass("sortable")&&(r=24);i.hasClass("filterable")&&(r=r+12);h=0;w||(h=i.closest("table").parent().scrollLeft());e=i.offset().left+i.outerWidth(!0)-r+f.outerWidth(!0)/2-n(window).width();r=r+h;e>0&&(s=s-e-16,$arrow=f.find(".card-arrow"),$arrow.css({left:"calc(50% - 0.5rem + "+(e+16)+"px)"}));u=t.find(".table-search").outerHeight(!0);u===undefined?u=0:u+=8;f.css({top:a.top+l+p+u+50,left:s-r})},bb_table_filter:function(t){t.on("click",".filterable .fa-filter",function(){n.bb_table_filter_calc.call(this,t)})},bb_table_getCaretPosition:function(n){var t=-1,i=n.selectionStart,r=n.selectionEnd;return i==r&&(i==n.value.length?t=1:i==0&&(t=0)),t},bb_table_excel_keybord:function(t){var f=t.find(".table-excel").length>0;if(f){var i={TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40},e=function(n){var t=window.setTimeout(function(){window.clearTimeout(t);n.focus();n.select()},10)},r=function(t,i){var r=!1,f=t[i],u=n(f).find("input.form-control:not([readonly]");return u.length>0&&(e(u),r=!0),r},u=function(n,t){var o=n.closest("td"),e=o.closest("tr"),u=e.children("td"),f=u.index(o);if(t==i.LEFT_ARROW){while(f-->0)if(r(u,f))break}else if(t==i.RIGHT_ARROW){while(f++0&&(u>0&&(h=i.parent().css("height"),t.find(".table-search-collapse").each(function(){n(this).data("fixed-height",h)})),i.parent().css({height:"calc(100% - "+e+"px)"}));o=r.outerHeight(!0);o>0&&i.css({height:"calc(100% - "+o+"px)"})},bb_table:function(t,i,r,u){var f=window.setInterval(function(){var e=n(t).find(".table");e.length!==0&&(window.clearInterval(f),n.bb_table_init(t,i,r,u))},100)},bb_table_init:function(t,i,r,u){var f=n(t),l=f.find(".table-fixed").length>0,a,h,c,e,o,v,s;if(l){a=f.find(".table-fixed-header");h=f.find(".table-fixed-body");h.on("scroll",function(){var n=h.scrollLeft();a.scrollLeft(n)});if(c=f.find(".fixed-scroll"),c.length===1){for(e=c.prev();e.length===1;)if(e.hasClass("fixed-right")&&!e.hasClass("modified"))o=e.css("right"),o=o.replace("px",""),n.browser.versions.mobile&&(o=parseFloat(o)-6+"px"),e.css({right:o}).addClass("modified"),e=e.prev();else break;n.browser.versions.mobile&&c.remove()}n.bb_table_fixedbody(f,h,a);f.find(".col-resizer:last").remove()}v=f.find(".table-cell.is-sort .table-text");s=u;v.each(function(){var i=n(this).parent().find(".fa:last"),t;i.length>0&&(t=s.unset,i.hasClass("fa-sort-asc")?t=s.sortAsc:i.hasClass("fa-sort-desc")&&(t=s.sortDesc),n(this).tooltip({container:"body",title:t}))});v.on("click",function(){var i=n(this),u=i.parent().find(".fa:last"),t="sortAsc",r,f;u.hasClass("fa-sort-asc")?t="sortDesc":u.hasClass("fa-sort-desc")&&(t="unset");r=n("#"+i.attr("aria-describedby"));r.length>0&&(f=r.find(".tooltip-inner"),f.html(s[t]),i.attr("data-original-title",s[t]))});f.children(".table-scroll").scroll(function(){f.find(".table-filter-item.show").each(function(){var t=n(this).attr("data-field"),i=f.find('.fa-filter[data-field="'+t+'"]')[0];n.bb_table_filter_calc.call(i,f)})});n.bb_table_row_hover(f);n.bb_table_filter(f);n.bb_table_resize(f);n.bb_table_excel_keybord(f);f.on("click",".table-search-collapse",function(){var i=n(this).toggleClass("is-open"),t=i.closest(".card").find(".card-body");t.length===1&&(t.is(":hidden")&&(l&&f.find(".table-fixed-body").parent().css({height:i.data("fixed-height")}),t.parent().toggleClass("collapsed")),t.slideToggle("fade",function(){var t=n(this);t.is(":hidden")&&t.parent().toggleClass("collapsed");l&&n.bb_table_fixedbody(f)}))})}});n(function(){n(document).on("keyup",function(t){var r,i;t.key==="Enter"?(r=n(t.target).closest(".table-container"),i=r.data("bb_table_search"),i&&i.obj.invokeMethodAsync(i.searchMethod)):t.key==="Escape"&&(r=n(t.target).closest(".table-container"),i=r.data("bb_table_search"),i&&i.obj.invokeMethodAsync(i.clearSearchMethod))});n(document).on("click",function(t){var i=n(t.target),u=i.closest(".dropdown-menu.show"),r;u.length>0||(r=i.closest(".btn-col"),r.length>0)||n(".table-toolbar > .btn-group > .btn-col > .dropdown-toggle.show").each(function(t,i){n(i).trigger("click")})})})}(jQuery),function(n){n.extend({bb_setTitle:function(n){document.title=n}})}(jQuery),function(n){n.extend({bb_toast_close:function(t){var i=n(t);i.find(".btn-close").trigger("click")},bb_toast:function(t,i,r){var f,o;window.Toasts===undefined&&(window.Toasts=[]);Toasts.push(t);var u=n(t),s=u.attr("data-bs-autohide")!=="false",e=parseInt(u.attr("data-bs-delay"));u.addClass("d-block");f=null;o=window.setTimeout(function(){window.clearTimeout(o);s&&(u.find(".toast-progress").css({width:"100%",transition:"width "+e/1e3+"s linear"}),f=window.setTimeout(function(){window.clearTimeout(f);u.find(".btn-close").trigger("click")},e));u.addClass("show")},50);u.on("click",".btn-close",function(n){n.preventDefault();n.stopPropagation();f!=null&&window.clearTimeout(f);u.removeClass("show");var t=window.setTimeout(function(){window.clearTimeout(t);u.removeClass("d-block");Toasts.remove(u[0]);Toasts.length===0&&i.invokeMethodAsync(r)},500)})}})}(jQuery),function(n){n.extend({bb_transition:function(t,i,r){n(t).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oAnimationEnd",function(){i.invokeMethodAsync(r)})}})}(jQuery),function(n){n.extend({bb_tree:function(t){var i=n(t);i.find(".tree-content").hover(function(){n(this).parent().addClass("hover")},function(){n(this).parent().removeClass("hover")});i.on("click",".tree-node",function(){var i=n(this),r=i.prev(),t=r.find('[type="radio"]');t.attr("disabeld")!=="disabled"&&t.trigger("click")})}})}(jQuery),function(n){n.extend({bb_tree_view:function(t){var i=n(t);i.find(".tree-content").hover(function(){n(this).parent().addClass("hover")},function(){n(this).parent().removeClass("hover")});i.on("click",".tree-node",function(){var i=n(this),r=i.prev(),t=r.find('[type="radio"]');t.attr("disabeld")!=="disabled"&&t.trigger("click")})}})}(jQuery),function(n){n.extend({bb_form:function(t){var i=n("#"+t);i.find("[aria-describedby]").each(function(t,i){var u=bootstrap.Tooltip.getInstance(i),r;u&&(r=n(i),r.tooltip("dispose"))})}})}(jQuery);
\ No newline at end of file
diff --git a/src/BootstrapBlazor/wwwroot/lib/extensions/longbow.component.js b/src/BootstrapBlazor/wwwroot/lib/extensions/longbow.component.js
index 29cca3b5af786eda80e01102d5dea4f20f3fb339..f26e1e4e86021d80f8a8732830eee638e8317918 100644
--- a/src/BootstrapBlazor/wwwroot/lib/extensions/longbow.component.js
+++ b/src/BootstrapBlazor/wwwroot/lib/extensions/longbow.component.js
@@ -152,7 +152,7 @@
}
dispose() {
- if (this._tooltip.tip !== null) {
+ if (this._tooltip != null && this._tooltip.tip !== null) {
this._tooltip.dispose();
}
super.dispose();
@@ -408,7 +408,7 @@
bootstrap.EventHandler.on(this._element, 'hide.bs.popover', this._hide);
if (this._config.dismiss != null) {
- bootstrap.EventHandler.on(document, 'click', this._config.dismiss, this._hide);
+ bootstrap.EventHandler.on(document, 'click', this._config.dismiss, () => this.hide());
}
}
@@ -440,9 +440,12 @@
});
bootstrap.EventHandler.on(document, 'click', function (e) {
+ const selector = `.${Dropdown.Default.class}.show`;
const el = e.target;
+ if (el.closest(selector)) {
+ return;
+ }
const owner = Utility.getDescribedElement(el.closest('.dropdown-toggle'));
- const selector = `.${Dropdown.Default.class}.show`;
document.querySelectorAll(selector).forEach(function (ele) {
if (ele !== owner) {
const element = Utility.getDescribedOwner(ele);