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.

Wrong rendering inside Bootstrap Tab and problem in sortable

See original GitHub issue

Hi! I’m having some problems. The use case is:

I have a tab-bar and in one of the tabs is the formBuild div. like bellow:

        <div class="tab-pane" id="tab_4">
            <div id="build-wrap"></div>
        </div>

I’m using this code to initialize the builder:

<script>
    var fbTemplate = document.getElementById('build-wrap');
    var options = {
        disableFields: [
            'autocomplete',
            'file',
            'date',
            'button',
            'header',
            'paragraph',
            'number'

        ],
        controlPosition: 'left'
    };
    $(fbTemplate).formBuilder(options);
</script>

But, when the builder is rendered, this is the output: screen shot 2017-04-09 at 08 11 16 And, when I add something to it, the render is all broken: ![screen shot 2017-04-09 at 08 13 17] (https://cloud.githubusercontent.com/assets/312820/24835241/72f88ef4-1cfc-11e7-8e15-444a0ee9b134.png)

And I got this in Chrome Console:

Uncaught TypeError: $(...).sortable is not a function
    at HTMLUListElement._helpers.stopMoving (http://[DOMAIN]]/plugins/formBuilder/form-builder.js:599:20)
    at t.(anonymous function).(anonymous function)._trigger (http://[DOMAIN]]/js/jquery-ui.min.js:6:10825)
    at t.(anonymous function).(anonymous function)._trigger (http://[DOMAIN]]/js/jquery-ui.min.js:13:2081)
    at t.(anonymous function).(anonymous function)._trigger (http://[DOMAIN]]/js/jquery-ui.min.js:6:4499)
    at t.(anonymous function).(anonymous function)._clear (http://[DOMAIN]]/js/jquery-ui.min.js:13:1945)
    at t.(anonymous function).(anonymous function)._clear (http://[DOMAIN]]/js/jquery-ui.min.js:6:4499)
    at HTMLLIElement.<anonymous> (http://[DOMAIN]]/js/jquery-ui.min.js:12:16724)
    at HTMLLIElement.d.complete (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.3/jquery.min.js:3:27996)
    at i (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.3/jquery.min.js:2:27151)
    at Object.fireWith [as resolveWith] (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.3/jquery.min.js:2:27914)

I’ve checked that I added the jquery-ui sortable, and everything is ok.

Can you give me some light? Or is this really a bug?

Thank you!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
tdsatcommented, Apr 15, 2017

There is a conflict with the bootstrap.css. Specifically because the panel is not active, so it has no height. That’s why when the form-builder tries to render it, it gives it a min-height:0px (It probably happens here )

There are a couple solutions.

  1. Set a panel as active (like this )

  2. Use Bootstap’s Tab Events like here

There are probably other ways too. Anyway hope it helps.

0reactions
paulohenriquesgcommented, Apr 15, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

fullCalendar + Bootstrap tabs glitch: not rendering events until ...
I'm having a strange problem when using fullCalendar along with Bootstrap, having the calendar rendered within a non active tab pane.
Read more >
jQuery DataTables: Column width issues with Bootstrap tabs
Provides solutions to common problems with incorrect column widths for a table using jQuery DataTables and Bootstrap tabs.
Read more >
Navs and tabs · Bootstrap v5.2
Navs and tabs. Documentation and examples for how to use Bootstrap's included navigation components. On this page
Read more >
Datatables within a bootstrap 3 tab
I have a page with three bootstrap tabs. ... {data: 'referral_code', name: 'participants.referral_code', sortable: false, render: $.fn.
Read more >
Top 18 Most Common AngularJS Developer Mistakes - Toptal
There are two main reasons: you can't apply two isolated scope directives to an element, and you may encounter issues with nesting /...
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