I have the same problem was thinking of creating a fix for my app using this:
var mouseIsDown = false;
var timert = '';
$('#ace_editor').on('touchstart', function() {
mouseIsDown = true;
timert = setTimeout(function() {
if(mouseIsDown) {
//mobile select triggered
}
}, 1000);
});
window.addEventListener('touchend', function() {
mouseIsDown = false;
clearTimeout(timert);
});
Boomp
Please test the fixed version at https://raw.githack.com/ajaxorg/ace/master/kitchen-sink.html.
@nightwing I'm on a Pixel 3 running Android 9 Pie here - I'm unable to notice a difference in opening the context menu by holding my finger on the screen. Am I missing something?
Which browser did you use? I have tested it with chrome on galaxy note 5, android 7.
@nightwing Chrome as well
@kognise unfortunately i was not able to reproduce the issue with chrome using pixel 3 on amazon device farm.
But since the native context menu doesn't work on firefox too maybe a custom menu would be a good compromise for now. Could you please test https://raw.githack.com/nightwing/ace/touch-handler/kitchen-sink.html.
huh! I just ran into this and I am so glad that you have fixed it @nightwing <3
But:
"ace-builds": "^1.4.5"
), doesn't work -- I can only "paste" but cannot select with tap and hold on a word in the editor.I am on Chrome in Android Pixel 3 XL.
PS. on a separate subject, it wouldn't be a bad idea to make kitchen-sink a little bit mobile friendly -- i.e. add a hamburger icon for options. Right now in portrait mode, I only have the right 20% of the screen showing me the code!
a gentle reminder about ^^ @nightwing. : )
I see your code at https://github.com/ajaxorg/ace/pull/3956 is merged on May and I can see these changes locally and in https://github.com/ajaxorg/ace-builds/releases/tag/v1.4.5.
However, I am still unable to find out why it works in githack's kitchen-sink but not in c9's kitchen-sink. Is there a config or something special I need to set?
Thanks!
Confirmed it's fixed in 1.4.6 by https://github.com/ajaxorg/ace/commit/795bd6a62c37985f10073e02eda79357d4748045. Thanks!
this ticket can be closed now, I believe.
Most helpful comment
Please test the fixed version at https://raw.githack.com/ajaxorg/ace/master/kitchen-sink.html.