Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right frame doesn't hide when clicking "I know this term well" #61

Closed
jzohrab opened this issue Nov 4, 2022 · 2 comments · Fixed by #62
Closed

Right frame doesn't hide when clicking "I know this term well" #61

jzohrab opened this issue Nov 4, 2022 · 2 comments · Fixed by #62
Labels
ux User Experience could be better

Comments

@jzohrab
Copy link

jzohrab commented Nov 4, 2022

The code in insert_word_ignore.php implies that the right frame should disappear, which would be nice:

    window.parent.document.getElementById('frame-l').focus();
    window.parent.setTimeout('cClick()', 100);

A few things wrong with this:

overlib_mini.js:189 Uncaught TypeError: Cannot read properties of null (reading 'style')
    at hideObject (overlib_mini.js:189:27)
    at eval (eval at runHook (overlib_mini.js:309:48), <anonymous>:1:1)
    at runHook (overlib_mini.js:309:48)
    at cClick (overlib_mini.js:45:32)
@HugoFara HugoFara added bug Something isn't working ux User Experience could be better and removed bug Something isn't working labels Nov 5, 2022
@jzohrab
Copy link
Author

jzohrab commented Nov 6, 2022

Fix done in #62 that makes this LWT much smoother for me to use.

@HugoFara HugoFara linked a pull request Nov 10, 2022 that will close this issue
@HugoFara
Copy link
Owner

Merged your PR, I figured out what was the issue. The structure window.parent.setTimeout('cClick()', 100); seems a bit wrong, but makes sense in the context:

  • We have multiple frames.
  • A child frame wants to close the overing div in parent window, for instance when you change word status.
  • So it should call cClick from parent context, using a timeout.
    • Either you call setTimeout(window.parent.cClick, time)
    • You can also use a string to be evaluated in the context, so window.parent.setTimeout('cClick', time).

As I already merged some of the frames, things are easier today, but the code may stay a bit ugly while things are not standard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ux User Experience could be better
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants