Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fix-cutoff-placeholder-text'
Browse files Browse the repository at this point in the history
  • Loading branch information
adunkman committed Sep 5, 2017
2 parents 497c427 + c697408 commit b200fa4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions coffee/chosen.jquery.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,8 @@ class Chosen extends AbstractChosen
width = div.width() + 25
div.remove()

container_width = @container.outerWidth()

width = Math.min(container_width - 10, width)
if @container.is(':visible')
width = Math.min(@container.outerWidth() - 10, width)

@search_field.width(width)

Expand Down
5 changes: 2 additions & 3 deletions coffee/chosen.proto.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,8 @@ class @Chosen extends AbstractChosen
width = div.measure('width') + 25
div.remove()

container_width = @container.getWidth()

width = Math.min(container_width - 10, width)
if container_width = @container.getWidth()
width = Math.min(container_width - 10, width)

@search_field.setStyle(width: width + 'px')

Expand Down

0 comments on commit b200fa4

Please # to comment.