iink SDK Web

Undo function not working as expected

While using the iinkJS with Math recognition and image/png in the mime type, the undo functionality does not work as expected.

You can find video for the issue on Github - https://github.com/MyScript/iinkJS/issues/26

Steps to replicate the issue:

  1. Open the myScript editor
  2. Draw a number
  3. Click on undo button
  4. Redo button is still disabled.

Issue:

"changed" and "exported" event listeners are not getting triggered when the first drawn element is removed using the undo button because of which the redo button is still in the disabled mode. Additionally, the result content is not cleared from the UI because of the same issue.

Reference code is taken from - https://github.com/MyScript/iinkJS/blob/master/examples/v4/websocket_math_iink.html
Demo link - https://codesandbox.io/s/myscript-image-issue-demo-7vh21l
Note: replace the server keys with the actual ones to view this behavior on the demo link (https://codesandbox.io/s/myscript-image-issue-demo-7vh21l?file=/index.html:197968-198084)


Hi Supriya,


Thank you for contacting us.


We confirm that we are reproducing the issue with the 2.0.1 version.

But at the moment, we cannot commit on when the issue can be fixed.


Best regards,


Gwenaëlle

Hi Oliver,

Could you please share any updates on this?

Hi Olivier,

From the demo link shared by my colleague Jatin - https://codesandbox.io/s/myscript-image-issue-demo-forked-expr3f?file=/index.html

Please observe that we are using the latest version 2.0.1 of iinkJS and the issue is still persisting.

Steps to replicate the issue:

1. Open the myScript editor

2. Draw a number

3. Click on undo button

4. Redo button is still disabled.

Issue: When the first drawn element is removed using the undo button, the redo button is still in the disabled mode. Additionally, the result content is not cleared from the UI.

Note that this issue does not occur when we remove "image/png" from the mime-type. 

Alternatively, you can refer to this video for a better understanding - Demo Video

Fix that we are looking out for - The iinkJS functionality should work fine on all mime-types including "image/png" i.e. the undo and redo functionalities should work fine on the first drawn element.


Thanks

Supriya

Dear Jatin,


thank you for contacting us.


Currently, is there a specific reason you are using the iinkJS 1.4.5: <script src="https://cdn.jsdelivr.net/npm/iink-js@1.4.5/dist/iink.min.js"></script> ?


Indeed, simply updating to the latest 2.0.1 version, I got the redo working:  <script src="https://cdn.jsdelivr.net/npm/iink-js@2.0.1/dist/iink.min.js"></script>


Indeed, it seems this is caused by the "image/png" mimetype, that is not supported for Math in 1.4.5 (while it is with the latest iinkJS).


Best regards,


Olivier

Login or Signup to post a comment