esotalk / esoTalk

Fat-free forum software.
GNU General Public License v2.0
1.47k stars 239 forks source link

Swiftkey on iOS is giving problems #385

Open tvb opened 9 years ago

tvb commented 9 years ago

I noticed when using Swiftkey on iOS to submit an new post it is not registering the input so the post button stays disabled. Also the @mention system is nog registering input and therefor not suggesting any members but is probably related to the first problem.

jgknight commented 9 years ago

First, can you confirm this is still an issue? We can investigate this however my guess would be that swiftkey isn't triggering a keyup event. You can do this in a browser by pressing down a key in a reply, the buttons won't enable until you let go of the key. This is due to conversation.js

// Add event handlers on the textarea to enable/disable buttons.
        textarea.keyup(function(e) {
                if (e.ctrlKey) return;
                $("#reply .postReply, #reply .saveDraft")[$(this).val() ? "enable" : "disable"]();
                ETConversation.editingReply = $(this).val() ? true : false;
        });

Perhaps we could switch it to .keydown() or .keypress() ? @tvb I don't have an iOS device to test this on with swiftkey. Perhaps if you tried changing this method to one of the other two event handlers and see if that solves the problem?

One issue I potentially see with keydown() is if you hit backspace to clear out a textbox, it may not disable the buttons. Looking at our options, using .change() may actually be best. It watches for value changes. But again I'd need an iOS/Switfkey device to test.