Skip to content
This repository was archived by the owner on Sep 10, 2023. It is now read-only.

Commit b65741b

Browse files
committed
Merge pull request #531 from nfiniteset/bugs/dont-cut-off-placeholder-text
Don't cut off placeholder text in the input field.
2 parents f1ad560 + de7ff6f commit b65741b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jquery.tokeninput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ $.TokenList = function (input, url_or_data, settings) {
562562
// Get width left on the current line
563563
var width_left = token_list.width() - input_box.offset().left - token_list.offset().left;
564564
// Enter new content into resizer and resize input accordingly
565-
input_resizer.html(_escapeHTML(input_val));
565+
input_resizer.html(_escapeHTML(input_val) || _escapeHTML(settings.placeholder));
566566
// Get maximum width, minimum the size of input and maximum the widget's width
567567
input_box.width(Math.min(token_list.width(),
568568
Math.max(width_left, input_resizer.width() + 30)));

0 commit comments

Comments
 (0)