File: I-2302-Mail-Space-bar-no-longer-scrolls-preview-messages.patch

package info (click to toggle)
evolution 3.46.4-2%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 139,692 kB
  • sloc: ansic: 505,728; javascript: 8,030; xml: 5,208; python: 702; makefile: 559; sh: 294; perl: 169
file content (51 lines) | stat: -rw-r--r-- 1,891 bytes parent folder | download | duplicates (2)
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
43
44
45
46
47
48
49
50
51
From: Milan Crha <mcrha@redhat.com>
Date: Mon, 27 Mar 2023 13:54:02 +0200
Subject: I#2302 - Mail: Space bar no longer scrolls preview messages

This started with WebKitGTK 2.40.0.

Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/2302

(cherry picked from commit c3db2b69133baba1264386c1dd38e277338140d5)
---
 data/webkit/e-web-view.js | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/data/webkit/e-web-view.js b/data/webkit/e-web-view.js
index ab9ca5a..78f7dc3 100644
--- a/data/webkit/e-web-view.js
+++ b/data/webkit/e-web-view.js
@@ -805,6 +805,9 @@ Evo.MailDisplayUpdateIFramesHeight = function()
 
 	if (scrolly != -1 && document.defaultView.scrollY != scrolly)
 		document.defaultView.scrollTo(0, scrolly);
+
+	Evo.mailDisplayResizeContentToPreviewWidth();
+	Evo.mailDisplayUpdateMagicSpacebarState();
 }
 
 if (this instanceof Window && this.document) {
@@ -956,7 +959,9 @@ Evo.mailDisplayResizeContentToPreviewWidth = function()
 	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()
@@ -1284,8 +1289,10 @@ Evo.MailDisplayBindDOM = function(iframe_id, markCitationColor)
 	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)