twbs / ratchet

Build mobile apps with simple HTML, CSS, and JavaScript components.
http://goratchet.com
MIT License
14.62k stars 1.45k forks source link

js change event broken #769

Open seth100 opened 9 years ago

seth100 commented 9 years ago

Hi,

I'm using ratchet with backbone and jquery. I was using js change event to handle <radio> and <select> HTML elements. Now they does not work anymore on my phone. Here is the code:

events: {
        "tap #elem1":      "fn1",
        "change #radio_wrapper":    "set1",  
        "change #selector": "set2",
    },
// here the problem is that it never calls the set1 and set2 functions
<li class="table-view-cell">
         <div class="name"><p>Selector:</p></div>
         <div class="value">
             <div id="wrapper">
                 <select id="selector"  >
                     <option value="1">   
                           1
                     </option>
                     <option value="2">   
                            2
                     </option>
                 </select>
             </div>
         </div>
 </li>

<li class="table-view-cell">
 <p>
   <span class="radio_wrapper"> 
   <input id="radio_1" 
     data-radioid="rd1" type="radio" name="choose" value="1" checked /> 
          <label for="radio_1"></label>
    </span>
   <span class="radio_wrapper"> 
   <input id="radio_2" 
     data-radioid="rd2" type="radio" name="choose" value="2" checked /> 
          <label for="radio_2"></label>
    </span>
 </p>
</li>

I'm using cordova and crosswalk so the browser webview is based on chromium 39.

What is the problem? Thanks

Johann-S commented 9 years ago

Could you provide more of your code please ? (Your HTML structure, and your JS) Maybe a JSBin

seth100 commented 9 years ago

I edited the code

Johann-S commented 9 years ago

I cannot see where you bind the change event on your JS