laviastar / iscroll-js

Automatically exported from code.google.com/p/iscroll-js
MIT License
2 stars 2 forks source link

Disabled inputs should not be usable #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an input (like radio button) with a disabled attribute
2. Try to tap on it

What is the expected output? What do you see instead?
Browser should not let it be selected, should not activate change event, etc.

What version of the product are you using? On what operating system?
3.5.1, iOS4

Please provide any additional information below.
Here's the 1-line-fix we added near where the fake click even is being 
dispatched:

      if(target.nodeName.toUpperCase() != "INPUT" || typeof(target.attributes["DISABLED"]) == "undefined") {
              target.dispatchEvent(ev);
      }

Original issue reported on code.google.com by dsboul...@gmail.com on 9 Sep 2010 at 9:59