Textarea not scrollable
Tested on a bunch of android devices (Nexus 5: 4.4, Galaxy S4: 4.3, Galaxy S3) and iOS devices (iPhone4S: iOS6, iPhone5: iOS7.1) and the textarea is not scrollable when the content is larger than the textarea size.
Also of note, the keyboard-open class is not added to body element like inputs are.
Version: Beta3
I'm using basic recommended html
<div class="list">
<div class="item item-input">
<textarea></textarea>
</div>
</div>
For others who also might need a quick fix, I am going to throw in an autogrow script.
I tried a bunch of autogrow scripts, including building one of my own. None of which play nicely with ionic and the way it handles taps and keyboard etc.
I'm running into the same issue right now. One of my views is a big form and scrolling is currently impossible. This is happening on v1.0.0-beta.3-nightly-1978 and Android 4.4.2
Taking a look at this right now
wow that was fast response. Thank you @tlancina I'm working on project which has to be finalized by May 15th and this one worries me a bit. So thank you for looking into it.
Just to add here couple more details about it. If I place my finger on the Textarea and move my finger very slowly the scrolling works as expected but if I move it quickly in order to scroll to the bottom of the screen then scrolling fails (sorry if this is not a good description). I've noticed the same behavior with other form input fields.
So we know why it's happening, just talking with @adamdbradley on addressing this specific scenario, stay tuned!
great thank you @tlancina
So it looks to me like it's actually a css issue, @mkuklis if you need a quick fix try removing overflow: hidden from .item-input in your css for now.
@tlancina thanks will give it a try.
Thanks @tlancina This fixed it for iOS only. Android is still undraggable
Okay this isn't the fix, but a step closer to one. I managed to fix it by making a textarea directive to stop touchstart touchmove touchend events bubbling up to ionic's document tap handler. This allows you to scroll the textarea BUT doesn't allow you to scroll the ion-content (obviously, since events are caught before it bubbles up that far)
Here is my test code:
app.directive('textarea', function(){
return {
restrict: 'E',
scope: {
'noIonic': '='
},
link: function(scope, element, attr){
if(scope.noIonic){
element.bind('touchend touchmove touchstart', function(e){
e.stopPropagation();
});
}
}
}
});
This might be good enough for some people who need a fix immediately
Another fix that might work better is to disable these events when focused, and re-enable them on blur. This would mean scrolling the textarea will work when you have focus/keyboard-up, and scroll the ion-content when it is not.
As @phoey noted in #1600, this can create a problem for very large text areas.
Gonna reopen this as a regression
Any update to this @perrygovier ?
Has that commit made it into master?
It has, Closing it as tim's commit says this closed the issue. Let me know if you're still seeing it.
My text area is still not scrollable when keyboard is open. Also when I press in the text field the cursor always returns to the top or bottom impossible to move the cursor to a desired spot.
I tried updating to Ionic, v1.0.0-beta.13. I have a very large text area with in a slide though not sure if that would be a problem:
<ion-slide class="post-slide">
<journalheader entry="entry"></journalheader>
<ion-content padding="true" class="has-header">
<form>
<textarea ng-model="post.content" ng-keyup="save()"> Content </textarea><br/>
</form>
</ion-content>
<journalfooter class="hide-on-keyboard-open"></journalfooter>
</ion-slide>
Hy,
Any update to this?? I have the same issue with Ionic beta 13.
Thanks
Hi guys,
I've got the same issue - when my textarea is focused, I can't scroll the whole page by touching inside the textarea. I saw the issue was resolved in https://github.com/driftyco/ionic/issues/2374 but I can't seem to resolve it by using the directive there.
I've tried to update ionic bundle to beta 14 but the issue is still there.
I've been testing on HTC One.
Any fix?
Thanks a lot.