Skip to content
This repository was archived by the owner on Dec 14, 2021. It is now read-only.

Commit 2aa792f

Browse files
Merge pull request #26 from mendix/fix/jquery
Fix JQuery hasOwnProperty error
2 parents c7b7941 + 67167ef commit 2aa792f

File tree

3 files changed

+27
-15
lines changed

3 files changed

+27
-15
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "BootstrapTooltip",
3-
"version": "3.2.3",
3+
"version": "3.2.4",
44
"description": "This widget adds a tooltip to an user defined field, containing for example help text or extra information.",
55
"license": "Apache-2.0",
66
"author": "Mendix Technology B.V.",
77
"dependencies": {
8-
"bootstrap": "^3.3.7",
9-
"jquery": "^3.5.0"
8+
"bootstrap": "^3.4.1",
9+
"jquery": "^3.5.1"
1010
},
1111
"devDependencies": {
1212
"@babel/core": "^7.2.2",

src/BootstrapTooltip.js

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,26 @@ export default declare("BootstrapTooltip.widget.BootstrapTooltip", [_WidgetBase,
7777
}
7878

7979
if ($targetElement.length > 0) {
80-
$targetElement.tooltip({
81-
title: () => {
82-
return this._tooltipText;
83-
},
84-
placement: this.tooltipLocation,
85-
trigger: this._getTrigger(),
86-
html: this.tooltipRenderHTML
87-
});
80+
try {
81+
$targetElement.tooltip({
82+
title: () => {
83+
return this._tooltipText;
84+
},
85+
placement: this.tooltipLocation,
86+
trigger: this._getTrigger(),
87+
html: this.tooltipRenderHTML
88+
});
89+
} catch(e) {
90+
console.warn(
91+
"Did you configure BootstrapTooltip widget correctly? Couldn't start tooltip methods in the element with class '" +
92+
this.tooltipClassName +
93+
"' on same level as widget (id='" +
94+
this.domNode.id +
95+
"')"
96+
);
97+
cb();
98+
return;
99+
}
88100
} else {
89101
window.logger.warn("Form input not available at the moment");
90102
}

0 commit comments

Comments
 (0)