Mobile auto-correct issue

Support area for phpBB's mChat extension
Post Reply
Bgagger
Donor
Posts: 37
Joined: 28 Nov 2018, 15:57

Mobile auto-correct issue

#1

Post by Bgagger » 22 Feb 2019, 20:02

autocomplete="off" on the message entry field has been confirmed to disable auto-correct functions on some mobile devices. Notably Galaxy S6 with Chrome browser.

The autocomplete attribute is not intended to control such features, that is what the spellcheck attribute is for. But even setting spellcheck="true" on the tag does not resolve the issue.

I think for most devices auto-correct and spellchecking works fine. I am looking into what consequences turning autocomplete="on" could have for other devices/browsers. If anyone has any knowledge on this, please let me know.

Bgagger
Donor
Posts: 37
Joined: 28 Nov 2018, 15:57

Re: Mobile auto-correct issue

#2

Post by Bgagger » 28 Feb 2019, 18:13

We are now using this patch for mchat_panel.html in the style template (line 10):

Code: Select all

<textarea id="mchat-input" name="message" class="no-auto-resize {{ MCHAT_MAX_INPUT_HEIGHT ? 'mchat-multi-line' : 'mchat-single-line' }}" rows="1" autocomplete="on" spellcheck="true"></textarea>
After some further testing, I have so far not found any significant side effects for other browsers, but with this patch auto-correct functions work normally for more mobile browser users.

terry2
Posts: 174
Joined: 22 Oct 2016, 18:22
Location: My castle

Re: Mobile auto-correct issue

#3

Post by terry2 » 08 Mar 2019, 09:36

Dam this was asked on mine too lol just set auto complete to off.

User avatar
kasimi
mChat developer
Posts: 907
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Mobile auto-correct issue

#4

Post by kasimi » 09 Mar 2019, 17:53

Even though the autocomplete attribute is in the specifications, it doesn't seem to be taken into account at all. At least that's what I'm experiencing with Firefox on Desktop and Mobile.

What's also interesting is that in mChat 2.0.x where both textarea and input was used, only the input had autocomplete="off" while the textarea didn't. For mChat 2.1.0, I removed the input but for some reason copied autocomplete="off" over to the textarea. I probably shouldn't have. :D

@Bgagger, did you remove autocomplete="off" and check if that makes any difference, i.e. without adding spellcheck="true"?

Bgagger
Donor
Posts: 37
Joined: 28 Nov 2018, 15:57

Re: Mobile auto-correct issue

#5

Post by Bgagger » 09 Mar 2019, 19:20

kasimi wrote:
09 Mar 2019, 17:53
Even though the autocomplete attribute is in the specifications, it doesn't seem to be taken into account at all. At least that's what I'm experiencing with Firefox on Desktop and Mobile.

What's also interesting is that in mChat 2.0.x where both textarea and input was used, only the input had autocomplete="off" while the textarea didn't. For mChat 2.1.0, I removed the input but for some reason copied autocomplete="off" over to the textarea. I probably shouldn't have. :D

@Bgagger, did you remove autocomplete="off" and check if that makes any difference, i.e. without adding spellcheck="true"?
I did test setting autocomplete to on, off or remove it completely. As far as I can tell, desktop browsers tend to ignore the attribute on <textarea> tags, it is only really used by <input> tags.
On mobiles however there seems to be inconsistent behavior. For some browsers, or possibly the OS itself, the attribute can effect if the phone/tablet keyboard uses auto-correct features or not.
Since we changed to the current version (in the code above), I've not had any more complaints from mobile users and haven't seen or heard of any ill effects for other users at all.
As the docs say the stated purpose of the attribute is to allow users to re-enter previously entered values. Such as your e-mail address, so you don't have to re-write it again and again but pick it from a list. But it should not be used to give spelling advice, although some browsers apparently uses it that way.

I ended up adding spellcheck="true" just to be safe, since that is the attribute that should govern such mobile features. What I have noticed is that desktop browsers seem to disable their spellchecking if this is set to false, but I think the default behavior is true. Oddly enough though it did not seem to make a difference for mobile users in testing, only autocomplete did. But this was only tested on a few users on a separate test site, so it could still be effecting some.

User avatar
kasimi
mChat developer
Posts: 907
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Mobile auto-correct issue

#6

Post by kasimi » 09 Mar 2019, 21:22

I have applied your change here on this board: replaced autocomplete="off" with autocomplete="on" spellcheck="true". If nothing breaks I'll include it in the next mChat update.

Thanks for bringing this up. :+1:

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest