Skip to content

Commit

Permalink
fix: click event compatible with xhtml (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxiong10 committed Nov 26, 2020
1 parent 57f2219 commit b7cbc0d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/calendar/table-date.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default {
},
handleCellClick(evt) {
let { target } = evt;
if (target.tagName === 'DIV') {
if (target.tagName.toUpperCase() === 'DIV') {
target = target.parentNode;
}
const date = target.getAttribute('data-date');
Expand Down
2 changes: 1 addition & 1 deletion src/calendar/table-month.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default {
},
handleClick(evt) {
let { target } = evt;
if (target.tagName === 'DIV') {
if (target.tagName.toUpperCase() === 'DIV') {
target = target.parentNode;
}
const month = target.getAttribute('data-month');
Expand Down
2 changes: 1 addition & 1 deletion src/calendar/table-year.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default {
},
handleClick(evt) {
let { target } = evt;
if (target.tagName === 'DIV') {
if (target.tagName.toUpperCase() === 'DIV') {
target = target.parentNode;
}
const year = target.getAttribute('data-year');
Expand Down

0 comments on commit b7cbc0d

Please sign in to comment.