Skip to content

Commit 011a546

Browse files
committed
Issue 205: Calendar closes when input is leaved with a tab key
1 parent 3c1c79b commit 011a546

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

src/dateinput/dateinput.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@
317317
return self.hide(e);
318318
}
319319

320-
// esc key
321-
if (key == 27) { return self.hide(e); }
320+
// esc or tab key
321+
if (key == 27 || key == 9) { return self.hide(e); }
322322

323323
if ($(KEYS).index(key) >= 0) {
324324

test/dateinput/tabs.htm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
<script src="../js/jquery-1.4.2.js"></script>
2+
<script src="../js/jquery-1.5.min.js"></script>
33
<script src="../../src/tabs/tabs.js"></script>
44
<script src="../../src/dateinput/dateinput.js"></script>
55

@@ -28,7 +28,9 @@
2828

2929
<div class="pane">
3030
<h3>Tab 1</h3>
31-
<input type="date" name="mydate" />
31+
<input type="date" name="mydate" />
32+
<input type="text" name="foo" />
33+
<input type="date" name="mydate" />
3234
</div>
3335

3436
<div class="pane">

test/tabs/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@
4646

4747

4848
<script>
49-
$(".tabs").tabs(".pane");
49+
$(".tabs").tabs(".pane", {
50+
onClick: function () {
51+
console.log(this.getConf(), this.getCurrentPane(), this.getCurrentTab(), this.getIndex(), this.getPanes(), this.getTabs());
52+
}
53+
});
5054
</script>
5155

5256

0 commit comments

Comments
 (0)