Fix unclickable labels in onboarding
This commit is contained in:
parent
6089cc3c98
commit
2cf7a8c8b3
2 changed files with 28 additions and 10 deletions
|
@ -65,4 +65,22 @@ document.getElementById('onboardingForm').onsubmit = function(e){
|
|||
sendConfig(submitInfo)
|
||||
|
||||
e.preventDefault()
|
||||
}
|
||||
}
|
||||
|
||||
/* Fix label clicking since bulma is weird */
|
||||
|
||||
let labelClickFix = function(labels) {
|
||||
for (i = 0; i < labels.length; i++){
|
||||
labels[i].onclick = function(event){
|
||||
document.getElementsByName(event.target.getAttribute("for"))[0].checked ^= 1
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
let setupLabelFix = function(){
|
||||
var labels = document.getElementsByTagName('label')
|
||||
var icons = document.getElementsByTagName('i')
|
||||
labelClickFix(labels)
|
||||
labelClickFix(icons)
|
||||
}
|
||||
setupLabelFix()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue