1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
From: Milan Crha <mcrha@redhat.com>
Subject: Scroll preview messages with the space bar after WebKitGTK 2.40.x
Bug: https://gitlab.gnome.org/GNOME/evolution/-/issues/2302
Origin: https://gitlab.gnome.org/GNOME/evolution/-/commit/f9551bdef2b918517c4adc73264a5479b4c22e5c
Index: evolution-3.38.3/data/webkit/e-web-view.js
===================================================================
--- evolution-3.38.3.orig/data/webkit/e-web-view.js
+++ evolution-3.38.3/data/webkit/e-web-view.js
@@ -752,6 +752,9 @@ Evo.MailDisplayUpdateIFramesHeight = fun
if (scrolly != -1 && document.defaultView.scrollY != scrolly)
document.defaultView.scrollTo(0, scrolly);
+
+ Evo.mailDisplayResizeContentToPreviewWidth();
+ Evo.mailDisplayUpdateMagicSpacebarState();
}
if (this instanceof Window && this.document) {
@@ -903,7 +906,9 @@ Evo.mailDisplayResizeContentToPreviewWid
width -= 20; /* 10 + 10 margins of body */
traversar.set_iframe_and_body_width(document, width, width, 0);
- window.webkit.messageHandlers.scheduleIFramesHeightUpdate.postMessage(0);
+
+ if (document.documentElement.clientWidth - 20 > width)
+ window.webkit.messageHandlers.scheduleIFramesHeightUpdate.postMessage(0);
}
Evo.mailDisplayUpdateMagicSpacebarState = function()
@@ -1228,8 +1233,10 @@ Evo.MailDisplayBindDOM = function(iframe
Evo.mailDisplayResizeContentToPreviewWidth();
Evo.mailDisplayUpdateMagicSpacebarState();
- document.defaultView.onresize = Evo.mailDisplayResized;
- document.defaultView.onscroll = Evo.mailDisplayUpdateMagicSpacebarState;
+ if (document.body) {
+ document.body.onresize = Evo.mailDisplayResized;
+ document.body.onscroll = Evo.mailDisplayUpdateMagicSpacebarState;
+ }
}
Evo.MailDisplayShowAttachment = function(element_id, show)
|