Skip to content

Commit

Permalink
Force select2 fields to be full-width.
Browse files Browse the repository at this point in the history
Select2 was setting the Readers field to a width of 100px, presumably because
the field was not visible at the time that the Select2 instance was
initialized. There's probably a way to fix this properly through the Select2
API, but I couldn't figure it out.

Fixes #69.
  • Loading branch information
boonebgorges committed Nov 18, 2015
1 parent 8cdeb7f commit ce87363
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions assets/js/single.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
placeholder: SocialPaperI18n.reader_placeholder,
data: CACSP_Potential_Readers
} );

// Select2 can't set Readers width correctly because it's hidden.
$( 'input.select2-search__field' ).css( 'width', '249px' );
}

if ( 'undefined' !== typeof bp && 'undefined' !== typeof bp.mentions.users ) {
Expand Down

0 comments on commit ce87363

Please sign in to comment.