jsme-editor / jsme-editor.github.io

73 stars 19 forks source link

Scrolled pages breaks the behaviour of dialog boxes #26

Closed Phil-DS closed 1 year ago

Phil-DS commented 2 years ago

How to recreate:

  1. Go to the 'Try the JSME' page off of the JSME website https://jsme-editor.github.io/dist/JSME_test.html
  2. Click either the smarts query box button or help button, and see that the dialog is correct.
  3. Close the dialogs.
  4. Scroll so that the top edge of the JSME box is aligned to the top of the page
  5. Repeat step 2 and you will see the dialogs are set off of the top of the JSME box. (See images below)

Sometimes, these boxes don't reset either, which has left the query box far off of the top of the screen. This is a problem for any page with JSME that scrolls. It's also quite apparent in modal dialog boxes if the screen has scrolled. It seems that the scroll position of the page is not taken into account with the calculation for the position of the dialog boxes. Unfortunately, with the dialog boxes being appended to the body, there is little that can be done externally to handle the dialogs.

Where to scroll to in step 4 Screenshot 2022-06-15 at 10 12 33 SMARTs results Screenshot 2022-06-15 at 10 13 05 Help results Screenshot 2022-06-15 at 10 13 31

jsme-editor commented 1 year ago

Thanks for reporting the issue. I can reproduce it with google Chrome but not with Firefox. I don't know yet how to fix this browser dependency.

mykcci commented 3 months ago

This issue means that some features of JSME are not useable if the page has to be scrolled in order to see the applet, if a browser other than Firefox is being used, so it is quite significant. I wonder if there has been any progress in identifying the problem. With thanks for a super applet.