1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

[Editor] Fix few telemetry issues with the new alt text flow (bug 1915434)

This commit is contained in:
Calixte Denizet 2024-08-28 18:54:15 +02:00
parent ab052db5b3
commit 1658b0af55
4 changed files with 19 additions and 6 deletions

View file

@ -114,6 +114,11 @@ class NewAltTextManager {
createAutomaticallyButton.addEventListener("click", async () => {
const checked =
createAutomaticallyButton.getAttribute("aria-pressed") !== "true";
this.#currentEditor._reportTelemetry({
action: "pdfjs.image.alt_text.ai_generation_check",
data: { status: checked },
});
if (this.#uiManager) {
this.#uiManager.setPreference("enableGuessAltText", checked);
await this.#uiManager.mlManager.toggleService("altText", checked);