#13941 closed defect (fixed)
ticket preview not triggered
Reported by: | clemens | Owned by: | clemens |
---|---|---|---|
Priority: | normal | Component: | TracKeywordsPlugin |
Severity: | normal | Keywords: | patch |
Cc: | Trac Release: | 1.4 |
Description
The ticket preview rendering is not triggered when using the TracKeywordsPlugin (source:trackeywordsplugin/trunk@17396, version "1.0dev").
Concerning the ticket preview (at bottom of a ticket page) one should expect that "keyword" changes made by TracKeywordsPlugin are handled just like manual input.
The TracKeywordsPlugin offers a panel to modify the ticket "keywords" field by just clicking some predefined keywords without actually typing anything into the "keywords" field. Here seems to be the problem. We need to call a change event to trigger the preview.
Attachments (1)
Change History (5)
Changed 4 years ago by
Attachment: | trac_keywords_2021-01-17.js.diff added |
---|
comment:1 follow-up: 4 Changed 4 years ago by
Basically my patch just triggers the change event each time the plugin runs.
// trigger change event on the edit field in order to evoke ticket preview el.dispatchEvent(new Event('change'));
I tested and it works.
However, I have to admit one issue which I could not solve: At the very first keyword change after loading the ticket it will not trigger the preview. (I do not mean the first in the list, but the first ticket which the user would click. No matter which one.) I do not know why. This is somewhat disappointing.
comment:2 Changed 4 years ago by
Owner: | set to clemens |
---|---|
Status: | new → assigned |
comment:4 Changed 4 years ago by
Replying to clemens:
However, I have to admit one issue which I could not solve: At the very first keyword change after loading the ticket it will not trigger the preview. (I do not mean the first in the list, but the first ticket which the user would click. No matter which one.) I do not know why. This is somewhat disappointing.
Might be related to trac:#13298.
patch which will call the
change
event