Skip to content

Commit b7cbc0d

Browse files
committed
fix: click event compatible with xhtml (#550)
1 parent 57f2219 commit b7cbc0d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/calendar/table-date.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export default {
151151
},
152152
handleCellClick(evt) {
153153
let { target } = evt;
154-
if (target.tagName === 'DIV') {
154+
if (target.tagName.toUpperCase() === 'DIV') {
155155
target = target.parentNode;
156156
}
157157
const date = target.getAttribute('data-date');

src/calendar/table-month.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export default {
8888
},
8989
handleClick(evt) {
9090
let { target } = evt;
91-
if (target.tagName === 'DIV') {
91+
if (target.tagName.toUpperCase() === 'DIV') {
9292
target = target.parentNode;
9393
}
9494
const month = target.getAttribute('data-month');

src/calendar/table-year.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export default {
9191
},
9292
handleClick(evt) {
9393
let { target } = evt;
94-
if (target.tagName === 'DIV') {
94+
if (target.tagName.toUpperCase() === 'DIV') {
9595
target = target.parentNode;
9696
}
9797
const year = target.getAttribute('data-year');

0 commit comments

Comments
 (0)