Skip to content

Commit

Permalink
Revert "Merge pull request #459 from cblanken/issue-379-dictionary-ta…
Browse files Browse the repository at this point in the history
…b-autofocus"

PR 459 tried to address the dictionary fram pulling focus, but that PR
caused other issues:

- term form losing focus early - #471
- some dictionaries not loading - #469

This reverts commit 397211c, reversing
changes made to 1284c25.
  • Loading branch information
jzohrab committed Aug 24, 2024
1 parent 768eb8c commit 374baa3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
4 changes: 0 additions & 4 deletions lute/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,6 @@ div#read_pane_left {
width: 50%;
}

#read_pane_left:focus {
outline: none;
}

div#read_pane_right {
display: grid;
grid-template-rows: 18rem 1fr;
Expand Down
9 changes: 2 additions & 7 deletions lute/static/js/dict-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ class LookupButton {
this.btn.classList.add("dict-btn");
this.btn.onclick = () => this.do_lookup();

this.frame.addEventListener("load", (e) => {
if (this.frame.src && this.frame.src !== "about:blank" && this.is_active) {
this.frame.classList.add("dict-active");
readPaneLeft.focus();
}
});

LookupButton.all.push(this);
}

Expand All @@ -61,7 +54,9 @@ class LookupButton {
DictButton.all.forEach(button => button.deactivate());
this.is_active = true;
this.btn.classList.add("dict-btn-active");
this.frame.classList.add("dict-active");
}

};


Expand Down
2 changes: 1 addition & 1 deletion lute/templates/read/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<div id="read_pane_container">

<div id="read_pane_left" tabindex="0">
<div id="read_pane_left">

<div id="reading_menu">
{% include "read/reading_menu.html" %}
Expand Down

0 comments on commit 374baa3

Please sign in to comment.