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

Arrow keys don't work very well (at all) for navigation and changing status #170

Closed
jzohrab opened this issue Feb 2, 2024 · 4 comments
Closed
Labels
fixed Fixed in develop or master, to be launched.

Comments

@jzohrab
Copy link
Collaborator

jzohrab commented Feb 2, 2024

When reading the tutorial, click on a term and try repeatedly hitting the status update key (arrow up/down). You can currently only click the arrow up (or down) once, after which the up/down arrow no longer works.

My guess is that, since each status change triggers an ajax reload, the term becomes somehow "deselected" and the arrows don't work.

@jzohrab jzohrab added the bug label Feb 2, 2024
@jzohrab jzohrab added this to Lute-v3 Feb 2, 2024
@jzohrab
Copy link
Collaborator Author

jzohrab commented Feb 2, 2024

Back in 3.0.12, you could click a term, and then hit up/down arrow many times in a row to update the status. That's been lost since the full page ajax was added.

(Back in 3.0.6, you used to be able to use the up/down arrows to change the status just on hover. In 3.0.7 that was changed to only allow update for clicked terms.)

@jzohrab jzohrab moved this to In Progress in Lute-v3 Feb 3, 2024
@jzohrab
Copy link
Collaborator Author

jzohrab commented Feb 3, 2024

Calling the js method reload_text_div() calls

  const url = `/read/renderpage/${bookid}/${pagenum}`;
  const repel = $('#thetext');
  repel.load(url);

renderpage uses template return render_template("read/page_content.html", paragraphs=paragraphs) which has parent.start_hover_mode(false);, so that automatically starts hovering.

console messages have

xxx enter reload_text_div
add kwordmarked to ID-196-1    <<< This is where I try to set the class
mode:
click
in page_content.html
xxx enter start_hover_mode      <<< but this would clear it.

So the load of page_content calls script which gets executed ... whenever it gets executed, it happens to occur after I try to take control. That feels like the main issue.

@jzohrab jzohrab pinned this issue Feb 3, 2024
@jzohrab
Copy link
Collaborator Author

jzohrab commented Feb 3, 2024

That renderpage route is called in only a few places:

lute/static/js/lute.js:  const url = `/read/renderpage/${bookid}/${pagenum}`;
lute/templates/read/index.html:    const url = `/read/renderpage/${bookid}/${actualPage}`;
lute/templates/read/updated.html:        const url = `/read/renderpage/${bookid}/${pagenum}`;

@jzohrab
Copy link
Collaborator Author

jzohrab commented Feb 4, 2024

Fixed in #179.

@jzohrab jzohrab added the fixed Fixed in develop or master, to be launched. label Feb 4, 2024
@jzohrab jzohrab moved this from In Progress to Done in Lute-v3 Feb 4, 2024
@jzohrab jzohrab unpinned this issue Feb 5, 2024
@jzohrab jzohrab closed this as completed Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed Fixed in develop or master, to be launched.
Projects
None yet
Development

No branches or pull requests

1 participant