[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:28:52 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 0184d6fe49aa54470c64b680aa1431e370a4b71f
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Mar 11 18:15:58 2003 +0000

            Reviewed by John.
    
            - fixed 3166759 -- two fields both look like they have focus at webmail.iquest.net due to onblur
    
            * kwq/KWQTextField.mm:
            (-[KWQTextField selectText:]): Don't call -[NSTextField selectText:] in the case where we already
            have an editor, because the NSTextField version will cause the field to relinquish first responder
            and then take it back, which will send both onblur and onfocus.
            (-[KWQSecureTextField selectText:]): Same fix for the secure text field.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3796 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 53fb192..d95b089 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,15 @@
+2003-03-11  Darin Adler  <darin at apple.com>
+
+        Reviewed by John.
+
+        - fixed 3166759 -- two fields both look like they have focus at webmail.iquest.net due to onblur
+
+        * kwq/KWQTextField.mm:
+        (-[KWQTextField selectText:]): Don't call -[NSTextField selectText:] in the case where we already
+        have an editor, because the NSTextField version will cause the field to relinquish first responder
+        and then take it back, which will send both onblur and onfocus.
+        (-[KWQSecureTextField selectText:]): Same fix for the secure text field.
+
 2003-03-11  David Hyatt  <hyatt at apple.com>
 
 	Fix the 16000 pixel tall scrollbar on macromedia.com/software.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 53fb192..d95b089 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,15 @@
+2003-03-11  Darin Adler  <darin at apple.com>
+
+        Reviewed by John.
+
+        - fixed 3166759 -- two fields both look like they have focus at webmail.iquest.net due to onblur
+
+        * kwq/KWQTextField.mm:
+        (-[KWQTextField selectText:]): Don't call -[NSTextField selectText:] in the case where we already
+        have an editor, because the NSTextField version will cause the field to relinquish first responder
+        and then take it back, which will send both onblur and onfocus.
+        (-[KWQSecureTextField selectText:]): Same fix for the secure text field.
+
 2003-03-11  David Hyatt  <hyatt at apple.com>
 
 	Fix the 16000 pixel tall scrollbar on macromedia.com/software.
diff --git a/WebCore/kwq/KWQTextField.mm b/WebCore/kwq/KWQTextField.mm
index 761cd36..5709872 100644
--- a/WebCore/kwq/KWQTextField.mm
+++ b/WebCore/kwq/KWQTextField.mm
@@ -151,7 +151,16 @@
         [secureField selectText:sender];
         return;
     }
-    [super selectText:sender];
+    
+    // Don't call the NSTextField's selectText if the field is already first responder.
+    // If we do, we'll end up deactivating and then reactivating, which will send
+    // unwanted onBlur events.
+    NSText *editor = [self currentEditor];
+    if (editor) {
+        [editor setSelectedRange:NSMakeRange(0, [[editor string] length])];
+    } else {
+        [super selectText:sender];
+    }
 }
 
 - (BOOL)isEditable
@@ -426,7 +435,16 @@
     if (sender == self && inSetFrameSize) {
         return;
     }
-    [super selectText:sender];
+    
+    // Don't call the NSTextField's selectText if the field is already first responder.
+    // If we do, we'll end up deactivating and then reactivating, which will send
+    // unwanted onBlur events.
+    NSText *editor = [self currentEditor];
+    if (editor) {
+        [editor setSelectedRange:NSMakeRange(0, [[editor string] length])];
+    } else {
+        [super selectText:sender];
+    }
 }
 
 - (void)setFrameSize:(NSSize)size

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list