Wappler Version : 6.Beta3
Operating System : MacOS
Server Model: NodeJS
Database Type: MySQL
Hosting Type: Docker
Expected behavior
What do you think should happen?
The tootltip message should display when hovering mouse (default setting) over the button with tooltip message.
There should be no error in the dev console when clicked on a button with Tooltip
Dynamic Attribute.
Actual behavior
What actually happens?
No tootltip message is displayed when hovering mouse over the button.
An error message is recorded in the dev console when the button is clicked (screenshot attached).
How to reproduce
The is an example of the code that is generating this error.
<button class="btn btn-sm" dmx-on:click="sc_list_products.load()" dmx-bs-tooltip="'Click to refresh list'">
<i class="fa-solid fa-repeat fs-5 fa-fw"></i>
</button>
This seems to be a bug in Bootstrap 5.3. I’ve created an issue there and hope it will get fixed in the next bootstrap version.
The this context is not set when using function in component options · Issue #39094 · twbs/bootstrap (github.com)
2 Likes
Thanks for the update, Patrick.
guptast
September 27, 2023, 2:08am
6
I have been wondering whether bootstrap has released any updated version to resolve the issue with tooltips.
In the likelihood that a bootstrap fix is not released for another few months, is there any workaround, short of removing this element altogether from the UI?
Note: This is impacting Bootstrap v5.3 (v6.0-Beta-*) only.
brad
September 27, 2023, 2:20am
7
I hope they come up with a fix for this soon.
patrick
September 27, 2023, 10:07am
8
I’ve created a complete new script that uses the MutationObserver to watch the DOM and register tooltip on new added nodes. Also this update doesn’t use the this
keyword and works with bootstrap 5.3.
dmxBootstrap5Tooltips.zip (671 Bytes)
guptast
September 27, 2023, 10:38am
9
Hi Patrick,
I have just tested the new script and it’s working correctly now without any errors in the dev console.
Thank you so much for resolving this issue; it is greatly appreciated!
patrick
September 27, 2023, 10:54am
10
We will release the new script with the next update, will also make the same changes to the popover script.
1 Like
Teodor
September 28, 2023, 3:57pm
12
Fixed in Wappler 6 beta 10