A javascript click handler was modifying the view URL fragment without any checks.
Modifying the view URL fragment has the side effect of scrolling the view and prevents
proper text selection.
Surprisingly, that bug only occured on Firefox.
Differential D4491
assets/revision/diff-utils: Fix text selection in revision view anlambert on Nov 17 2020, 2:32 PM. Authored by
Details
A javascript click handler was modifying the view URL fragment without any checks. Modifying the view URL fragment has the side effect of scrolling the view and prevents Surprisingly, that bug only occured on Firefox. I tried to write a cypress test to reproduce the issue but simulating text
Diff Detail
Event TimelineComment Actions Build is green Patch application report for D4491 (id=15932)Rebasing onto 8a0f32d124... Current branch diff-target is up to date. Changes applied before testcommit afbb083eda6fba3358a6c9c393c58d464d3e4efc Author: Antoine Lambert <antoine.lambert@inria.fr> Date: Tue Nov 17 14:26:32 2020 +0100 assets/revision/diff-utils: Fix text selection in revision view Modifying view URL fragment without proper checks had the side effect of scrolling the view and thus preventing text selection. Surprisingly, that bug only occured on Firefox. See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/471/ for more details. Comment Actions Build is green Patch application report for D4491 (id=15932)Rebasing onto 8a0f32d124... Current branch diff-target is up to date. Changes applied before testcommit afbb083eda6fba3358a6c9c393c58d464d3e4efc Author: Antoine Lambert <antoine.lambert@inria.fr> Date: Tue Nov 17 14:26:32 2020 +0100 assets/revision/diff-utils: Fix text selection in revision view Modifying view URL fragment without proper checks had the side effect of scrolling the view and thus preventing text selection. Surprisingly, that bug only occured on Firefox. See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/472/ for more details. Comment Actions why store the current tab in a variable instead of just asking it when needed (using something similar to e.currentTarget.text.trim())? Comment Actions Because I do not like to duplicate code, the URL fragment modification happens in a function that is not only called by the click handler and it makes the code easier to read. Comment Actions Build is green Patch application report for D4491 (id=16111)Rebasing onto 57a0899490... Current branch diff-target is up to date. Changes applied before testcommit 6cc8f01cce1a5dc7c3692f8eb3129e35210d5249 Author: Antoine Lambert <antoine.lambert@inria.fr> Date: Tue Nov 17 14:26:32 2020 +0100 assets/revision/diff-utils: Fix text selection in revision view Modifying view URL fragment without proper checks had the side effect of scrolling the view and thus preventing text selection. Surprisingly, that bug only occured on Firefox. See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/484/ for more details. Comment Actions Build is green Patch application report for D4491 (id=16111)Rebasing onto 6cc8f01cce... First, rewinding head to replay your work on top of it... Fast-forwarded diff-target to base-revision-485-D4491. Changes applied before testSee https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/485/ for more details. Comment Actions Build is green Patch application report for D4491 (id=16111)Rebasing onto 6cc8f01cce... First, rewinding head to replay your work on top of it... Fast-forwarded diff-target to base-revision-486-D4491. Changes applied before testSee https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/486/ for more details. |