question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PLUGINS: Uncaught Error: TOOLTIP: Option "container" provided type "undefined" but expected type "(string|element|boolean)".

See original GitHub issue

steps to reproduce

  1. Include summernote
  2. Include plugin: specialchars
  3. Add specialchars to toolbar

browser version and os version and summernote version

OS: OSX High Sierra Browser: Chrome 64.0.3282.186 (Official Build) (64-bit) Summernote: 0.8.10 (bs4)

When attempting to use the specialchars plugin, I get the error in the Issue title, and the button doesn’t render. Looking at the code, it appears that this plugin (and the others included) is calling ui.button incorrectly. Changing the block at line 67 to read

context.memo('button.specialchars', function() {
    return ui.button(
        $,
        {
            container: options.container,
            contents: '<i class="fa fa-font fa-flip-vertical">',
            tooltip: lang.specialChar.specialChar,
            click: function() {
                self.show();
            }
        }
    ).render();
});

After this, the plugin appears to work, but does provide another error: No method named "destroy". Changing (after the above changes) line 301 to read

self.$dialog.find('button').tooltip('hide');

appears to resolve this as well.

The reasons I don’t simply submit a pull request are that

  • I don’t have a tremendous understanding of this repo, as I just started using it
  • I don’t know how to unit-test javascript
  • I can’t guarantee that nothing else breaks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:6

github_iconTop GitHub Comments

11reactions
woleicomcommented, Apr 28, 2018
var button = ui.button({
                                contents: '<i class="fa fa-child"/> Hello',
                                container: false,  //add option
                                tooltip: 'hello',
                                click: function () {
                                    // invoke insertText method with 'hello' on editor module.
                                    context.invoke('editor.insertText', 'hello');
                                }
                            });
7reactions
julianpoempcommented, May 16, 2018

I had the same problem. Adding container: false to the object for ui.button() fixed it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught Error: TOOLTIP: Option "container" provided type ...
PLUGINS : Uncaught Error: TOOLTIP: Option "container" provided type "undefined" but expected type "(string|element|boolean)".
Read more >
javascript - error with the bootstrap tooltip on drupal 7 site ...
error with the bootstrap tooltip on drupal 7 site : TOOLTIP: Option "animation" provided type "number" but expected type "boolean" · Ask ...
Read more >
Tooltips - Bootstrap
The tooltip plugin generates content and markup on demand, and by default places tooltips after their trigger element. Trigger the tooltip via JavaScript:...
Read more >
TOOLTIP: Option "content" provided type "null" but expected ...
Uncaught TypeError: TOOLTIP: Option "content" provided type "null" but expected type "(string|element|function)". I am using bootstrap 5,.
Read more >
Error With The Bootstrap Tooltip On Drupal 7 Site - ADocLib
In this HTML tutorial,. PLUGINS: Uncaught Error: TOOLTIP: Option "container" provided type "undefined" but expected type "(string|element|boolean)".
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found