Skip to content

Commit

Permalink
Use ID for getting input box in statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
MorenoTropical authored and mikehardy committed Nov 19, 2024
1 parent 168c460 commit 7cd6111
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AnkiDroid/src/main/java/com/ichi2/anki/pages/Statistics.kt
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class Statistics :
**/
private fun changeDeck(selectedDeckName: String) {
val javascriptCode = """
var textBox = [].slice.call(document.getElementsByTagName('input'), 0).filter(x => x.type == "text")[0];
var textBox = document.getElementById("statisticsSearchText");
textBox.value = "deck:\"$selectedDeckName\"";
textBox.dispatchEvent(new Event("input", { bubbles: true }));
textBox.dispatchEvent(new Event("change"));
Expand Down

0 comments on commit 7cd6111

Please sign in to comment.