Skip to content

Commit 601e8e1

Browse files
committed
1 parent dfbc8d1 commit 601e8e1

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

example.html

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,25 @@
1414
<link rel="stylesheet" href="src/jquery.tagsinput-revisited.css" />
1515

1616
<style>
17-
body, html {
17+
* {
18+
box-sizing: border-box;
19+
}
20+
21+
html {
22+
height: 100%;
23+
margin: 0;
24+
}
25+
26+
body {
27+
min-height: 100%;
1828
font-family: sans-serif;
29+
padding: 20px;
30+
margin: 0;
1931
}
2032

2133
label {
2234
display: block;
23-
margin: 20px 0 5px 0;
35+
padding: 20px 0 5px 0;
2436
}
2537
</style>
2638
</head>
@@ -29,6 +41,7 @@
2941
<label>Simple tags input:</label>
3042
<input id="form-tags-1" name="tags-1" type="text" value="foo,bar,baz,roffle">
3143

44+
<!--
3245
<label>Tags input with callbacks (check console):</label>
3346
<input id="form-tags-2" name="tags-2" type="text" value="foo,bar,baz,roffle">
3447
@@ -43,6 +56,7 @@
4356
4457
<label>Tags input with array of delimiters (comma and semicolon):</label>
4558
<input id="form-tags-6" name="tags-4" type="text" value="foo;bar">
59+
-->
4660
</form>
4761

4862
<script type="text/javascript">

src/jquery.tagsinput-revisited.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,10 @@
172172

173173
$(data.fake_input).val('');
174174
$(data.fake_input).data('pasted', false);
175-
176-
$(data.holder).on('click', data, function(event) {
177-
$(event.data.fake_input).focus();
178-
$(this).addClass('focus');
179-
});
180175

181176
$(data.fake_input).on('focus', data, function(event) {
182177
$(data.holder).addClass('focus');
178+
183179
if ($(this).val() === '') {
184180
$(this).removeClass('error');
185181
}

0 commit comments

Comments
 (0)