[geary/geary-0.12] Fix composer body text caret not being visible on reply. Bug 788797.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/geary-0.12] Fix composer body text caret not being visible on reply. Bug 788797.
- Date: Sat, 2 Dec 2017 09:47:27 +0000 (UTC)
commit 5f74d3992a2ff9b13f7881fd64b29430b756ba58
Author: Michael James Gratton <mike vee net>
Date: Thu Nov 16 12:49:49 2017 +1100
Fix composer body text caret not being visible on reply. Bug 788797.
* src/client/composer/composer-widget.vala (ComposerWidget::set_focus):
Ensure we grab the web view's focus only after its content has finished
loading.
src/client/composer/composer-widget.vala | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 509ab5b..5b842e6 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -810,8 +810,15 @@ public class ComposerWidget : Gtk.EventBox {
this.to_entry.grab_focus();
else if (not_compact && Geary.String.is_empty(subject))
this.subject_entry.grab_focus();
- else
- this.editor.grab_focus();
+ else {
+ // Need to grab the focus after the content has finished
+ // loading otherwise the text caret will not be visible.
+ if (this.editor.is_content_loaded) {
+ this.editor.grab_focus();
+ } else {
+ this.editor.content_loaded.connect(() => { this.editor.grab_focus(); });
+ }
+ }
}
// Initializes all actions and adds them to the action group
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]