Ignore my edit, the bug also happens with custom fonts.
We are fairly certain this didn’t happen before, as we were testing out the text input itself a fair amount before we noticed this problem. The only thing I have changed to test this out is the font, as I mentioned earlier I’ve used the native.systemFont and our own ttf font.
I haven’t changed ANYTHING else in my native.newTextBox code - same font size, same listener etc.
What I find extremely strange is that when I tested out a build using our own font yesterday it worked fine on my HTC Sensation. So I shared the apk with my boss who tested it and found that it didn’t work on his HTC Desire HD and Nexus 7.
I thought that maybe I had accidentally installed an old build on my device, so I rebuilt the app without making any changes and ran it on my Sensation…and it was broken again. I then tried the oldest apks that I had saved, and they too had the problem. But as I’ve already mentioned, at least one build worked - apparently not the oldest or newest builds (and I also tried some in between without any luck).
I’ve also tried using Corona builds 1043, 1076 and 1093 - the same thing happens with each version.
Here is my code for the text box, is there anything that is incorrect here:
local \_W = display.contentWidth local \_H = display.contentHeight local charLimits = {twitter = 140, linkedin = 600} local site = "twitter" --font size is fixed to 2 values, for retina and non-retina screens local inputFontSize = 40 / display.contentScaleX if inputFontSize \< 40 then inputFontSize = 20 else inputFontSize = 40 end local myMessageTxt = "Hi, This is my default text and I would like you to read it\nhttp://plantpot.co" local function textFieldListener( event ) if event.phase == "began" then --dont need to do anything here elseif event.phase == "editing" then --need to truncate the text as it is typed if it is too long if #event.target.text \> charLimits[site] then event.target.text = string.sub(event.target.text, 1, charLimits[site]) end myMessageText = event.target.text elseif event.phase == "submitted" then submitPost() end end --create the text box inputTextField = native.newTextBox( \_W \* 0.05, \_H \* 0.15, \_W \* 0.9, \_H \* 0.3 ) inputTextField.font = native.newFont( "myFontName", inputFontSize) inputTextField:setReferencePoint(display.CenterReferencePoint) inputTextField.x, inputTextField.y = \_W \* 0.5, \_H \* 0.25 inputTextField.isEditable = true inputTextField:addEventListener( "userInput", textFieldListener ) inputTextField.text = myMessageTxt
In theory none of these phases should be triggered when dragging, but even if they were I don’t see why this would prevent the box from scrolling.