When using the authority editor in Firefox, it is not possible to set the cursor or select text from the text field. At some point (after bug 34114 ?), there was a similar problem with mouse operations (set cursor, select etc.) in draggable fields in the biblio editor. This was fixed by bug 35425. NB the problem only shows up in Firefox, Chrome seems to work correctly. To reproduce: start editing an existing authority record and try to put the cursor with the mouse in the middle of the content of any subfield or to select text with the mouse.
Created attachment 163633 [details] [review] Bug 36388: Mouse operation does not work in draggable fields in authority editor When using the authority editor in Firefox, it is not possible to set the cursor or select text from the text field. This patch mimics the corrections made in bug 35425 for biblio editor. Test plan: ========== 1. Start editing an existing authority record and try to put the cursor with the mouse in the middle of the content of any subfield or to select text with the mouse. It should not be possilbe. 2. Apply the patch (reload plack etc.). 3. Repeat p. 1 - everything should work as expected.
Created attachment 163652 [details] [review] Bug 36388: Mouse operation does not work in draggable fields in authority editor When using the authority editor in Firefox, it is not possible to set the cursor or select text from the text field. This patch mimics the corrections made in bug 35425 for biblio editor. Test plan: ========== 1. Start editing an existing authority record and try to put the cursor with the mouse in the middle of the content of any subfield or to select text with the mouse. It should not be possilbe. 2. Apply the patch (reload plack etc.). 3. Repeat p. 1 - everything should work as expected. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Note: there was related issue: Bug 35383, solved differently, but I think we should analyze how to make "common", unified solution with same coding style
Also referencing Bug 36324, which I should have referenced was happening in a Chrome based browser.
Created attachment 165825 [details] [review] Bug 36388: Mouse operation does not work in draggable fields in authority editor When using the authority editor in Firefox, it is not possible to set the cursor or select text from the text field. This patch mimics the corrections made in bug 35425 for biblio editor. Test plan: ========== 1. Start editing an existing authority record and try to put the cursor with the mouse in the middle of the content of any subfield or to select text with the mouse. It should not be possilbe. 2. Apply the patch (reload plack etc.). 3. Repeat p. 1 - everything should work as expected. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
The first attempt, the selected text in a subfield has a 1 second latency before highlighting text selected. (auth and biblios so it's from Bug 35383) That's weird but not blocking. (In reply to Andrii Nugged from comment #3) > Note: there was related issue: Bug 35383, solved differently, but I think we > should analyze how to make "common", unified solution with same coding style Good point, I had issues testing and when it worked, I forgot about this and attached a second signoff (it's just a 2nd signoff, it's valid). Back to this remark, for QA that's an issue because copying the change of bug 35425 is introducing duplication. initializeSortable() is totally duplicated and even the calls to it would benefit from being in the same place for biblios and auths to be sure that if those for on editor are changed, the others are. cataloging.js is included in addbiblio.tt and authorities.tt so unless something unexpected, moving the js change from addbiblio.tt and authorities.tt to cataloging.js should work. And then it's possible to solve the duplication of when cloning a field in cataloging.js. Because that part has the same code as initializeSortable() I don't know if it was noticed in bug 35425 that duplication was introduced, but it was it might have been ok to not bother. But now it's a third time duplication, see rule of three: https://en.wikipedia.org/wiki/Rule_of_three_(computer_programming)
(In reply to Victor Grousset/tuxayo from comment #6) > And then it's possible to solve the duplication of when cloning a field in > cataloging.js. > Because that part has the same code as initializeSortable() Victor, thank you for your remark. I'm submitting a corrected version following your suggestion--for your evaluation. The strange thing is, however, that we do not notice any latency when highlighting strings after a click...
Created attachment 165851 [details] [review] Bug 36388: Mouse operation does not work in draggable fields in authority editor When using the authority editor in Firefox, it is not possible to set the cursor or select text from the text field. This patch mimics the corrections made in bug 35425 for biblio editor. Test plan: ========== 1. Start editing an existing authority record and try to put the cursor with the mouse in the middle of the content of any subfield or to select text with the mouse. It should not be possilbe. 2. Apply the patch (reload plack etc.). 3. Repeat p. 1 - everything should work as expected. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Created attachment 165852 [details] [review] Bug 36388: Mouse operation does not work in draggable fields in authority editor When using the authority editor in Firefox, it is not possible to set the cursor or select text from the text field. This patch mimics the corrections made in bug 35425 for biblio editor. Test plan: ========== 1. Start editing an existing authority record and try to put the cursor with the mouse in the middle of the content of any subfield or to select text with the mouse. It should not be possilbe. 2. Apply the patch (reload plack etc.). 3. Repeat p. 1 - everything should work as expected. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Created attachment 166105 [details] [review] Bug 36388: Mouse operation does not work in draggable fields in authority editor When using the authority editor in Firefox, it is not possible to set the cursor or select text from the text field. This patch mimics the corrections made in bug 35425 for biblio editor. Test plan: ========== 1. Start editing an existing authority record and try to put the cursor with the mouse in the middle of the content of any subfield or to select text with the mouse. It should not be possilbe. 2. Apply the patch (reload plack etc.). 3. Repeat p. 1 - everything should work as expected. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Created attachment 166478 [details] [review] Bug 36388: Mouse operation does not work in draggable fields in authority editor When using the authority editor in Firefox, it is not possible to set the cursor or select text from the text field. This patch mimics the corrections made in bug 35425 for biblio editor. Test plan: ========== 1. Start editing an existing authority record and try to put the cursor with the mouse in the middle of the content of any subfield or to select text with the mouse. It should not be possilbe. 2. Apply the patch (reload plack etc.). 3. Repeat p. 1 - everything should work as expected. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
> The strange thing is, however, that we do not notice any latency when highlighting strings after a click... Only happens in 0XX fields. Anyway. Works, makes sense, QA script happy, code looks good, passing QA :)
Pushed for 24.05! Well done everyone, thank you!
Pushed to 23.11.x for 23.11.06
Not needed in 23.05.x, no backport.