-
Notifications
You must be signed in to change notification settings - Fork 208
[Bug] data is sent multiple times #76
Comments
Hi, the data was sent to two APIs for different purposes. v3/text API was queried for advanced features, such as paragraph OCR, basic table OCR, MathML result, TSV result, and more. v3/latex was queried for rendering the results. Sending two requests was introduced in v0.6.0. In the second latest version v0.7.3, the legacy v3/latex API was removed. The cost of removing this API is the user cannot view some rendered result (only equations will be rendered), they need to paste the result into a LaTeX editor before they can view the results. With removing the legacy API, each data will be sent once now. I got a few issue reports about the key listening problem. I cannot explain why but indeed sometimes the key listening just doesn't work no matter which key you chose. In fact, the reason why I chose Backspace for preview is I got a report saying that the Space key doesn't work. You may try the latest version in this repo (v0.7.4) to see if it's working or not. |
In theory, all key listening should work. If you wish, you may try to figure out why sometimes some key just doesn't work. Eventually, I would still like to use the Space key for preview screenshot and the Enter key for making OCR requests. |
If I understand correctly the latest |
Some keys are only processed by some JavaFX nodes. The top tier nodes don't. Text fields do. Maybe the issue with space is the same. Try and set focus on one of the text fields and then press space. Maybe setting the focus automatically will solve your problem. HTH. |
Good thought. |
Describe the bug
I used the MathPix dashboard to check on my information and observed more recorded requests than I had done.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected one message per button press.
Desktop (please complete the following information):
Additional context
I changed the code and added
println
to confirm what was happening.The message was in fact sent twice. I then confirmed that no press de-bounce
code was present in the Java code.
I have added de-bounce to the
BackGridPane
class here.I also added additional changes to the accepted keys:
insert
to do the same asbackspace
delete
to do the same asenter
The reason is that the
enter
will only work if one of the text fields have focus.However the
delete
is always detected (like the backspace) and allows usto forego the selection of a text field.
If you like, I can make a pull request with these changes.
The text was updated successfully, but these errors were encountered: