Merge pull request #74 from liang611zh/master

Fix click outside the image has no action issue
This commit is contained in:
Brad Traversy 2021-08-03 15:32:24 -04:00 committed by GitHub
commit ad88863870
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,12 @@ ratingsContainer.addEventListener('click', (e) => {
e.target.parentNode.classList.add('active')
selectedRating = e.target.nextElementSibling.innerHTML
}
if(e.target.classList.contains('rating')) {
removeActive()
e.target.classList.add('active')
selectedRating = e.target.nextElementSibling.innerHTML
}
})
sendBtn.addEventListener('click', (e) => {