[prev in list] [next in list] [prev in thread] [next in thread] 

List:       konq-bugs
Subject:    [Bug 282953] DOMFocus(In|Out) depreciated -> focus(in|out)
From:       Gérard Talbot <browserbugs () gtalbot ! org>
Date:       2011-09-29 20:27:23
Message-ID: E1R9NCV-0001Qv-Ag () bugs ! kde ! org
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=282953


Gérard Talbot <browserbugs@gtalbot.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |browserbugs@gtalbot.org




--- Comment #1 from Gérard Talbot <browserbugs gtalbot org>  2011-09-29 20:27:23 ---
bugzilla33,

Thank you for your bug report and your testpage.

1- Please note that the last argument of addEventListener should be a boolean

  void               addEventListener(in DOMString type, 
                                      in EventListener listener, 
                                      in boolean useCapture);

best would be to use true or false. I believe it should be false in your script
(since focusin and focusout bubble).

2- Also, event registration should be performed once the document has been
fully loaded (window and document loading are not synchronously achieved). So,
this is what I suggest as replacement:

Line 6:  <script type="text/javascript">//<![CDATA[

function startTest()
{

  
document.addEventListener('focusin',function(e){if(e.target.tagName=='INPUT')e.target.style.backgroundColor='green'},false);
  
document.addEventListener('focusout',function(e){if(e.target.tagName=='INPUT')e.target.style.backgroundColor='white'},false);


}
  //]]></script>
 </head>
 <body onload="startTest();">

3- Your function and code could be made to be able (more versatile) to report
the event type supported and the event being currently fired during user/tester
interaction and not just the toggling of green/red background-colors. Event
registration could be done only on the input object (since it is the object
being tested, being targeted in the testcase) instead of the document object.

4- As you know, DOM 3 Events is still a working draft. DOMFocusIn and
DOMFocusOut are right now supposed to be deprecated but not obsolete in DOM 3
Events. For many reasons and various types of reasons, do not expect this bug
to be fixed anytime soon.

regards, Gérard Talbot

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Konq-bugs mailing list
Konq-bugs@kde.org
https://mail.kde.org/mailman/listinfo/konq-bugs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic