[Libreoffice-commits] help.git: Branch 'libreoffice-6-4' - help3xsl/default.css help3xsl/help.js
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 30 22:34:34 UTC 2020
help3xsl/default.css | 1 +
help3xsl/help.js | 6 ++----
2 files changed, 3 insertions(+), 4 deletions(-)
New commits:
commit f1cb84713664fefd3892671808efe31234e11eec
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Jan 30 09:32:18 2020 +0100
Commit: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Thu Jan 30 23:34:12 2020 +0100
tdf#127566: don't change divcopyable border width in onclick handler
Instead, define border width in respective CSS, to make it consistent
in both clicked and non-clicked states, and avoid "jumping" on click.
Change-Id: Ic8ab8d0fd586059e21de6aa866fef95226774acf
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/87718
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
(cherry picked from commit 35281f4c9178f373609a61f0a44e268b179c5749)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/87756
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/help3xsl/default.css b/help3xsl/default.css
index eeaa160d1..fe70e4262 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -296,6 +296,7 @@ h6 {
.pycode,
.bascode {
+ border: solid 5px transparent;
margin-top: 15px;
margin-bottom: 15px;
}
diff --git a/help3xsl/help.js b/help3xsl/help.js
index 75541e674..48767222e 100644
--- a/help3xsl/help.js
+++ b/help3xsl/help.js
@@ -106,19 +106,17 @@ for (var i = 0, len = itemcopyable.length; i < len; i++) {
(function() {
var item = itemcopyable[i];
- function changeBorder(item, color, colorToChangeBackTo) {
+ function changeBorder(item, color) {
var saveBorder = item.style.border;
- item.style.border = "solid 5px";
item.style.borderColor = color;
setTimeout(function() {
item.style.border = saveBorder;
- item.style.borderColor = colorToChangeBackTo;
}, 150);
}
item.onclick = function() {
document.execCommand("copy");
- changeBorder(item, "#18A303", "transparent");
+ changeBorder(item, "#18A303");
};
item.addEventListener("copy", function(event) {
event.preventDefault();
More information about the Libreoffice-commits
mailing list