iscroll icon indicating copy to clipboard operation
iscroll copied to clipboard

No way to focus outside input. focus out prevented by iScroll.js

Open alvarotrigo opened this issue 7 years ago • 5 comments

I saw it was reported in Stackoverflow too.

Reproduction online

alvarotrigo avatar Mar 20 '17 17:03 alvarotrigo

I also noticed that you can not select text, as well as select the checkbox or radio

eeeman1 avatar Mar 21 '17 10:03 eeeman1

iScroll doesn't check the preventDefaultException for move events. I've patched this here in my local installation.

ray007 avatar Mar 23 '17 08:03 ray007

@ray007 can you elaborate that? As per the docs I can see preventDefaultExeption is set by default to

{ tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/ }

What's your suggested solution?

alvarotrigo avatar Mar 23 '17 10:03 alvarotrigo

I IScroll's _move(e) method I changed

if ( this.options.preventDefault ) {
	e.preventDefault();
}

to

if ( this.options.preventDefault && !utils.preventDefaultException(e.target, this.options.preventDefaultException) ) {	// increases performance on Android? TODO: check!
	e.preventDefault();
}

see similar checks in _start(e) and _end(e).

ray007 avatar Mar 24 '17 09:03 ray007

so... any updates to this? I'm having issues selecting a checkbox on mobile...

VictorChen avatar Apr 24 '18 22:04 VictorChen