alfredobarron
8/19/2015 - 9:59 PM

width 100% in bootstrap 3 into tabs

width 100% in bootstrap 3 into tabs

/**
* Change line 4927
*/
Select2.prototype._resolveWidth = function ($element, method) {
  var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;

  if (method == 'resolve') {
    var styleWidth = this._resolveWidth($element, 'style');

    if (styleWidth != null) {
      return styleWidth;
    }

    return this._resolveWidth($element, 'element');
  }

  if (method == 'element') {
    var elementWidth = $element.outerWidth(false);

    if (elementWidth <= 0) {
      return 'auto';
    }
    
    //return elementWidth + 'px';
  }