Hey,

   I've compiled a possible patch for the bug about stealing the focus
when editing a node
(http://bugzilla.ximian.com/show_bug.cgi?id=76346).

The point is that the bug is hard to reproduce (at least, here occurs
only few times), so it's hard to say the patch solved the bug. Does
this bug happens often to you?? Please, try the patch and tell me if
it corrects the bug.

Another thing is that I'm not sure the approach is valid, since it
makes the text area like a modal widget that has always the keyboard
focus while in edit mode. I think there is no problem with that, but
I'm not 100% confident, so I want your opinions.

Mario
Index: browser.cs
===================================================================
--- browser.cs  (revision 51504)
+++ browser.cs  (working copy)
@@ -2184,6 +2184,12 @@
        public System.Xml.XmlNode edit_node;
        public string edit_url;
        
+       void FocusOut (object sender, FocusOutEventArgs args)
+       {
+               if (TabMode == Mode.Editor)
+                       text_editor.GrabFocus ();       
+       }
+
        public Tab(Browser br) 
        {
 
@@ -2255,6 +2261,7 @@
                text_editor.Buffer.Changed += new EventHandler 
(EditedTextChanged);
                text_editor.WrapMode = WrapMode.Word;
                sw.Add(text_editor);
+               text_editor.FocusOutEvent += new FocusOutEventHandler 
(FocusOut);
                
                //
                // XML editing buttons
_______________________________________________
Mono-docs-list maillist  -  Mono-docs-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-docs-list

Reply via email to