Page MenuHomePhorge

Conpherence: cannot type a newline from Android
Open, LowPublic

Description

In Conpherence it seems is not possible to type a newline Android devices, without sending the message.

Steps to reproduce:

What happens:

It sends the message.

What should happen instead:

You just type a newline.

Additional notes:

Note that some applications has ENTER to newline and shift+ENTER to send message. This is not the case. On mobile, in both cases it sends the message.

Resources

It seems this is the JavaScript file that handles the sendOnEnter stuff:

https://we.phorge.it/source/phorge/browse/master/webroot/rsrc/js/core/behavior-phabricator-remarkup-assist.js

The current code is:

  if (config.sendOnEnter) {
	    // Send on enter if the shift key is not held.
	    JX.DOM.listen(area, 'keydown', null,
	      function(e) {
	        if (e.getSpecialKey() != 'return') {
	          return;
	        }
	
	        // Let other listeners (particularly the inline autocomplete) have a
	        // chance to handle this event.
	        if (JX.Stratcom.pass()) {
	          return;
	        }
	
	        var raw = e.getRawEvent();
	        if (raw.shiftKey) {
	          // If the shift key is pressed, let the browser write a newline into
	          // the textarea.
	          return;
	        }
	
	        if (edit_mode == 'fullscreen') {
	          // Don't send on enter in fullscreen
	          return;
	        }
	
	        // From here on, interpret this as a "send" action, not a literal
	        // newline.
	        e.kill();
	
	        // This allows 'workflow' and similar actions to take effect.
	        // Such as pontificate in Conpherence
	        var form = e.getNode('tag:form');
	        JX.DOM.invoke(form, 'didSyntheticSubmit');
	      });
	  }

shift+Enter: Internal events on Firefox Desktop 111

Screenshot_2023_04_02_112145.png (207×1 px, 75 KB)

https://w3c.github.io/uievents/tools/key-event-viewer.html

shift+Enter: Internal events on Fennec Android 110

Screenshot_2023_04_02_112323.png (185×1 px, 35 KB)

https://w3c.github.io/uievents/tools/key-event-viewer.html

→ it seems mobile is fundamentally broken


Interestingly, this seems a specific bug in the default Android AOSP keyboard, shipped I think in at least one billion devices:

https://stackoverflow.com/q/75911453/3451846

https://android.googlesource.com/platform/packages/inputmethods/LatinIME/

Event Timeline

valerio.bozzolan triaged this task as High priority.
valerio.bozzolan created this object in space S1 Public.
avivey lowered the priority of this task from High to Low.Mar 30 2023, 18:19

It's probably not possible to reproduce this problem on just a desktop with Firefox Responsive Mode. I also tried with an on-screen keyboard and nothing.

@avivey Can you just test this?

https://w3c.github.io/uievents/tools/key-event-viewer.html

So entering "shift + enter" and verifying in which case do you fall.

If you don't see any "shift" event I think me and you have a bug in our stock keyboard. I filed a question here:

https://stackoverflow.com/q/75911453/3451846

@avivey Can you just test this?

https://w3c.github.io/uievents/tools/key-event-viewer.html

So entering "shift + enter" and verifying in which case do you fall.

If you don't see any "shift" event I think me and you have a bug in our stock keyboard. I filed a question here:

https://stackoverflow.com/q/75911453/3451846

I tested it myself and shift did not appeared.

@avivey Can you just test this?

https://w3c.github.io/uievents/tools/key-event-viewer.html

So entering "shift + enter" and verifying in which case do you fall.

If you don't see any "shift" event I think me and you have a bug in our stock keyboard. I filed a question here:

https://stackoverflow.com/q/75911453/3451846

I tested it myself and shift did not appeared.

Can you please share which version of Android version and which virtual keyboard (I think the default one)?

avivey renamed this task from Conpherence: fix mobile not able to add a newline to Conpherence: cannot add a newline in mobile.Apr 2 2023, 14:23
valerio.bozzolan renamed this task from Conpherence: cannot add a newline in mobile to Conpherence: cannot type a newline from Android.Apr 2 2023, 14:52
valerio.bozzolan updated the task description. (Show Details)

@avivey Can you just test this?

https://w3c.github.io/uievents/tools/key-event-viewer.html

So entering "shift + enter" and verifying in which case do you fall.

If you don't see any "shift" event I think me and you have a bug in our stock keyboard. I filed a question here:

https://stackoverflow.com/q/75911453/3451846

I tested it myself and shift did not appeared.

Can you please share which version of Android version and which virtual keyboard (I think the default one)?

I use recent versions of Android.

Just to say that I'm damn desperate in troubleshooting...

I also tested this keyboard that seems is a notable fork of the Android AOSP default input, aaaaand..... it's also broken in the way it sends shift+Enter. I don't know the name of the keyboard, it's just a screenshot from a friend that says it's based on AOSP:

Russian Keyboard.png (681×576 px, 155 KB)

rotfl

adding a " full screen" button in the mobile view might just solve this.