mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
set focus() only if it wasn't scrolled, selection and type=email throws errors
This commit is contained in:
@@ -22,9 +22,8 @@
|
||||
ele.dispatchEvent(clickEvent);
|
||||
|
||||
if(ele.tagName === 'INPUT' || ele.tagName === 'TEXTAREA') {
|
||||
if(ele.selectionStart === 0 && ele.selectionEnd === 0 && !isScrolledSinceStart(e)) {
|
||||
if(!isScrolledSinceStart(e)) {
|
||||
ele.focus();
|
||||
ele.setSelectionRange && ele.setSelectionRange(ele.value.length, ele.value.length);
|
||||
}
|
||||
e.preventDefault();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user