cubiq / iscroll

Smooth scrolling for the web
http://iscrolljs.com
MIT License
12.88k stars 3.81k forks source link

[iScroll5] default for option "preventDefaultException" needs case-insensitive regex flag added #676

Open lupod opened 10 years ago

lupod commented 10 years ago

To make a <select> work with the iScroll option click: true; enabled, the default option for preventDefaultException actually contains the corresponding tag name. However, it only works if the tag is marked up in uppercase letters because the regex does not contain the i flag for case-insensitive match: preventDefaultException: { tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/ } it works for me if I override this by: preventDefaultException: { tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/i } I believe this should be adjusted in the default value.

cubiq commented 10 years ago

what doctype are you using?

lupod commented 10 years ago

I am using XHTML5:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- ... -->