termux-api icon indicating copy to clipboard operation
termux-api copied to clipboard

termux-dialog text dismissed when accidentally touch outside dialog

Open nicola-leoni opened this issue 6 years ago • 1 comments

termux-dialog text dismissed when touched outside the dialog I use termux-dialog text -m in scripts to enter a lot of text, and everything is fine until writing I accidentally click over the keyboard, outside the dialog: the dialog is dismissed and all my edits are lost. And for my workflow and my clumsy fingers this bug it's blocking, and actually I can't use termux-dialog anymore.

Steps to reproduce

  • open termux
  • run termux-dialog text -m
  • write a lot of text
  • click accidentally outside the dialog

Expected behavior Would be very nice if the dialog would not be dismissed, at least, if is not possibile, fill the exit data with the edited text, so I can show the dialog again without loosing the edits.

Additional information

$ termux-info 
Updatable packages:
apt/stable 1.4.9-15 aarch64 [upgradable from: 1.4.9-10]
bash/stable 5.0.7-3 aarch64 [upgradable from: 5.0.7-1]
busybox/stable 1.30.1-7 aarch64 [upgradable from: 1.30.1-2]
command-not-found/stable 1.39 aarch64 [upgradable from: 1.38]
coreutils/stable 8.31-7 aarch64 [upgradable from: 8.31-3]
debianutils/stable 4.8.6.3 aarch64 [upgradable from: 4.8.6.2]
dnsutils/stable 9.14.4 aarch64 [upgradable from: 9.14.3]
dpkg/stable 1.19.7-4 aarch64 [upgradable from: 1.19.7]
gpgv/stable 2.2.17 aarch64 [upgradable from: 2.2.16]
krb5/stable 1.17 aarch64 [upgradable from: 1.16.3-1]
less/stable 551-1 aarch64 [upgradable from: 530-2]
libbz2/stable 1.0.8-1 aarch64 [upgradable from: 1.0.6-4]
libcurl/stable 7.65.3-2 aarch64 [upgradable from: 7.65.1]
libdb/stable 18.1.32-2 aarch64 [upgradable from: 18.1.32-1]
liblzma/stable 5.2.4-3 aarch64 [upgradable from: 5.2.4-2]
ncurses/stable 6.1.20190511-5 aarch64 [upgradable from: 6.1.20190511-1]
openssl/stable 1.1.1c-1 aarch64 [upgradable from: 1.1.1c]
termux-tools/stable 0.68-1 all [upgradable from: 0.66]
Subscribed repositories:
https://dl.bintray.com/grimler/science-packages-24 science/stable
https://dl.bintray.com/grimler/game-packages-24 games/stable
https://dl.bintray.com/termux/termux-packages-24 stable/main
System information:
Linux localhost 4.14.85-16247232 #1 SMP PREEMPT Mon Jun 17 21:26:01 KST 2019 aarch64 Android
Termux-packages arch:
aarch64
Android version:
9
Device manufacturer:
samsung
Device model:
SM-G970F

nicola-leoni avatar Jul 27 '19 19:07 nicola-leoni

Also, touching outside the dialog should return another code so the script can be able to differentiate between this case and hitting CANCEL. Currently there's no difference between these two cases and you can't determine which has occurred.. Related issue #541

Android-X13 avatar Aug 15 '22 18:08 Android-X13