diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index 4263800b8..e8e8be201 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@ - 6.3.3-beta03 + 6.3.3 diff --git a/src/BootstrapBlazor/Components/Tooltip/Tooltip.js b/src/BootstrapBlazor/Components/Tooltip/Tooltip.js index 8442a9f9c..2e73e5a1e 100644 --- a/src/BootstrapBlazor/Components/Tooltip/Tooltip.js +++ b/src/BootstrapBlazor/Components/Tooltip/Tooltip.js @@ -2,31 +2,33 @@ $.extend({ bb_tooltip: function (id, method, title, placement, html, trigger) { var ele = document.getElementById(id); - var instance = bootstrap.Tooltip.getInstance(ele); - if (instance) { - instance.dispose(); - } - if (method !== 'dispose') { - var op = { html: html, sanitize: !html, title: title, placement: placement, trigger: trigger }; - instance = new bootstrap.Tooltip(ele, op); - var $ele = $(ele); - if (method === 'enable') { - var $ctl = $ele.parents('form').find('.is-invalid:first'); - if ($ctl.prop("nodeName") === 'INPUT') { - if ($ctl.prop('readonly')) { + if (ele !== null) { + var instance = bootstrap.Tooltip.getInstance(ele); + if (instance) { + instance.dispose(); + } + if (method !== 'dispose') { + var op = { html: html, sanitize: !html, title: title, placement: placement, trigger: trigger }; + instance = new bootstrap.Tooltip(ele, op); + var $ele = $(ele); + if (method === 'enable') { + var $ctl = $ele.parents('form').find('.is-invalid:first'); + if ($ctl.prop("nodeName") === 'INPUT') { + if ($ctl.prop('readonly')) { + $ctl.trigger('focus'); + } + else { + $ctl.focus(); + } + } + else if ($ctl.prop("nodeName") === 'DIV') { $ctl.trigger('focus'); } - else { - $ctl.focus(); - } } - else if ($ctl.prop("nodeName") === 'DIV') { - $ctl.trigger('focus'); + else if (method !== '') { + $ele.tooltip(method); } } - else if (method !== '') { - $ele.tooltip(method); - } } }, }); diff --git a/src/BootstrapBlazor/Components/ValidateForm/ValidateForm.js b/src/BootstrapBlazor/Components/ValidateForm/ValidateForm.js index 164f396b1..165d67da4 100644 --- a/src/BootstrapBlazor/Components/ValidateForm/ValidateForm.js +++ b/src/BootstrapBlazor/Components/ValidateForm/ValidateForm.js @@ -3,8 +3,11 @@ bb_form: function (id, method) { var $el = $('#' + id); $el.find('[aria-describedby]').each(function (index, ele) { - var $ele = $(ele); - $ele.tooltip('dispose'); + var tooltip = bootstrap.Tooltip.getInstance(ele); + if (tooltip) { + var $ele = $(ele); + $ele.tooltip('dispose'); + } }); } }); diff --git a/src/BootstrapBlazor/wwwroot/js/bootstrap.blazor.bundle.min.js b/src/BootstrapBlazor/wwwroot/js/bootstrap.blazor.bundle.min.js index 7c6d37c97..3b33a917f 100644 --- a/src/BootstrapBlazor/wwwroot/js/bootstrap.blazor.bundle.min.js +++ b/src/BootstrapBlazor/wwwroot/js/bootstrap.blazor.bundle.min.js @@ -13,4 +13,4 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this /*! Summernote v0.8.18 | (c) 2013- Alan Hong and other contributors | MIT license */ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("jquery"));else if("function"==typeof define&&define.amd)define(["jquery"],e);else{var n="object"==typeof exports?e(require("jquery")):e(t.jQuery);for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(function(t){return(()=>{"use strict";var e={9458:e=>{e.exports=t}},n={};function o(t){var i=n[t];if(void 0!==i)return i.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,o),r.exports}o.amdO={},o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{o.r(i);var t=o(9458),e=o.n(t);function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var n=0;n'),u=s('