Safari 9 - Tab click doesn't fire change event


Blalo

On Safari 9, changing a radio button via its label doesn't trigger an alert. Do you know the reason or solution?

HTML

<input id="star-1" type="radio" name="question[1]" value="1" required>
<label for="star-1" title="stella 1">
    <i class="active fa fa-star" aria-hidden="true"></i>
</label>
<input id="star-2" type="radio" name="question[1]" value="2" required>
<label for="star-2" title="stella 2">
    <i class="active fa fa-star" aria-hidden="true"></i>
</label>

JS

var inputRadio = document.querySelectorAll('input[type="radio"]');
for (var i = 0; i < inputRadio.length; i++) {
    inputRadio[i].addEventListener('change', function() {
        alert('ciao');
    });
}
Chris DJ

Your code works in Safari 9:

var inputRadio = document.querySelectorAll('input[type="radio"]');
for (var i = 0; i < inputRadio.length; i++) {
  inputRadio[i].addEventListener('change', function() {
    alert('ciao');
  });
}

http://jsfiddle.net/dbmk9xL8/1/ - Here's a fiddle to prove it.

Maybe some CSS messed up?

Related


Safari 9 - Tab click doesn't fire change event

Blalo On Safari 9, changing a radio button via its label doesn't trigger an alert. Do you know the reason or solution? HTML <input id="star-1" type="radio" name="question[1]" value="1" required> <label for="star-1" title="stella 1"> <i class="active fa fa-

Safari 9 - Tab click doesn't fire change event

Blalo On Safari 9, changing a radio button via its label doesn't trigger an alert. Do you know the reason or solution? HTML <input id="star-1" type="radio" name="question[1]" value="1" required> <label for="star-1" title="stella 1"> <i class="active fa fa-

Safari 9 - Tab click doesn't fire change event

Blalo On Safari 9, changing a radio button via its label doesn't trigger an alert. Do you know the reason or solution? HTML <input id="star-1" type="radio" name="question[1]" value="1" required> <label for="star-1" title="stella 1"> <i class="active fa fa-

Safari 9 - Tab click doesn't fire change event

Blalo On Safari 9, changing a radio button via its label doesn't trigger an alert. Do you know the reason or solution? HTML <input id="star-1" type="radio" name="question[1]" value="1" required> <label for="star-1" title="stella 1"> <i class="active fa fa-

Safari doesn't fire click event on select element on time

Hafez Divandari Chrome and Firefox fire click events on select elements while their options menu is open, but Safari doesn't fire events until the options menu is closed. I need the click event to fire immediately on click, is there any workaround? I tested on

Safari doesn't fire click event on select element on time

Hafez Divandari Chrome and Firefox fire click events on select elements while their options menu is open, but Safari doesn't fire events until the options menu is closed. I need the click event to fire immediately on click, is there any workaround? I tested on

Safari doesn't fire click event on select element on time

Hafez Divandari Chrome and Firefox fire click events on select elements while their options menu is open, but Safari doesn't fire events until the options menu is closed. I need the click event to fire immediately on click, is there any workaround? I tested on

Kendo grid change event doesn't fire on row button click

Kanishka In the following code snippet, although the selectable property is set, the change event does not fire on the kendo grid. even tried selectable: "OK" function initializeGrid(gridData) { $("#kendo-list").empty(); $("#kendo-list"

Kendo grid change event doesn't fire on row button click

Kanishka In the following code snippet, although the selectable property is set, the change event does not fire on the kendo grid. even tried selectable: "OK" function initializeGrid(gridData) { $("#kendo-list").empty(); $("#kendo-list"

"touchmove" event doesn't fire on Mobile Safari?

resemble Mobile Safari doesn't register touchmoveevents! touchstartand touchendboth work fine, but touchmoverefuse to fire. $("#Element").on({ "touchmove" : function(e){ e.preventDefault(); console.log("touch move!"); } }); resemble Th

"touchmove" event doesn't fire on Mobile Safari?

resemble Mobile Safari doesn't register touchmoveevents! touchstartand touchendboth work fine, but touchmoverefuse to fire. $("#Element").on({ "touchmove" : function(e){ e.preventDefault(); console.log("touch move!"); } }); resemble Th

"touchmove" event doesn't fire on Mobile Safari?

resemble Mobile Safari doesn't register touchmoveevents! touchstartand touchendboth work fine, but touchmoverefuse to fire. $("#Element").on({ "touchmove" : function(e){ e.preventDefault(); console.log("touch move!"); } }); resemble Th

Safari on iOS 9 doesn't fire click events on hidden input files

Hugo Demiglio I have a website with an upload field, but it's inputhidden display: none;, I have one divfor calling this action. It works on iOS 8, but now after updating iOS 9 nothing happens when I touch the div. I've tried using [0].click()like or pure Vani

Safari on iOS 9 doesn't fire click events on hidden input files

Hugo Demiglio I have a website with an upload field, but it's inputhidden display: none;, I have one divfor calling this action. It works on iOS 8, but now after updating iOS 9 nothing happens when I touch the div. I've tried using [0].click()like or pure Vani

Why doesn't the click event always fire?

Ian: If you're revisiting this question, I've moved all the updates to the bottom so it's actually a better question. question I'm running into a weird problem when using to handle browser events D3. Unfortunately this exists in a very large application, and s

Clicking on the label doesn't fire the click event

Andre I have the following code: <label><input type="checkbox">True?</label> and $("label").click(function () { $(this).toggleClass("active"); }); When I click the checkbox class toggle, when I click "Yes?" nothing happens. Why? Then if I don't wrap the ch

The click event on the button doesn't seem to fire

Tim B I'm no stranger to HTML or JavaScript, although I don't use them very often. However, I'm very new to PHP and am currently facing a strange issue when trying to get a click event on a button embedded in HTML in PHP: <!DOCTYPE html> <html lang="de"> <hea

Clicking on the label doesn't fire the click event

Andre I have the following code: <label><input type="checkbox">True?</label> and $("label").click(function () { $(this).toggleClass("active"); }); When I click the checkbox class toggle, nothing happens when I click "Yes?" . Why? Then if I don't wrap the c

The click event on the button doesn't seem to fire

Tim B I'm no stranger to HTML or JavaScript, although I don't use them very often. However, I'm very new to PHP and am currently facing a strange issue when trying to get a click event on a button embedded in HTML in PHP: <!DOCTYPE html> <html lang="de"> <hea

jQuery click event doesn't fire

Abhijith P Haridas I am working on a project where I am using ajax to load content into a page. My jQuery function is: function load_room() { var sem = 0; $.ajax({ url: 'ajax/room_ajax.php?option=2', type: 'POST', data: { 'sem'

Resize event doesn't fire on every click

Elizabeth The resize event I created to display the sliding slider image in the modal fires only once on the initial width. If I close the modal, manually move the width of the window, and then open the modal again, the image doesn't resize. Therefore, they do

WPF button doesn't fire click event

Scott Stowe I have a dialog which contains a calendar control and a button. After the user selects a date on the calendar, they click the "Save" button, which takes the action and closes the dialog: <Window...> <Grid x:Name="CalendarGrid"> <Grid.Co

Clicking on the label doesn't fire the click event

Andre I have the following code: <label><input type="checkbox">True?</label> and $("label").click(function () { $(this).toggleClass("active"); }); When I click the checkbox class toggle, when I click "Yes?" nothing happens. Why? Then if I don't wrap the ch