• 
      

    Work around IE's broken 'hasAttribute'

    Review Request #183 — Created Dec. 6, 2007 and submitted — Latest diff uploaded

    Information

    Review Board SVN (deprecated)
    trunk
    261, 279

    Reviewers

    Internet Explorer silently fails all calls to <node>.hasAttribute, which causes Review Board's line-comment system to fail.  A decent workaround is to use getAttribute instead, as that will return either null or "" when the attribute doesn't exist (depending on the DOM implementation), which are both boolean-false.
    
    This fix was suggested by Mark Dewing in issue 261.
    I verified that comments work on the following platforms:
        RHEL5, Firefox 2.0.0.4
        WinXP, Firefox 2.0.0.11
        WinXP, Internet Explorer 6.0 SP2
        Vista, Internet Explorer 7.0