Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2893

FormTag doesn't render the focus javascript compliant with xhtml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 1.2 Family
    • 1.3.12, 1.4.0
    • Tag Libraries
    • None
    • Windows XP SP2, IBM Think Centre
    • Patch

    Description

      Taking a look at the FormTag code (precisely, the renderFocusJavascript() method), I found this:

      // xhtml script content shouldn't use the browser hiding trick
      if (!this.isXhtml())

      { results.append(" <!--"); results.append(lineEnd); }

      I guess the if statement should be the opposite, since we need javascript code inside <!-- ... --> for xhtml compliance, don't we?

      Also, the following snippet doesn't need the !this.isXhtml() check...

      if (!this.isXhtml() && this.scriptLanguage)

      { results.append(" language=\"JavaScript\""); }

      Regards, Tedy.

      Attachments

        Issue Links

          Activity

            People

              pbenedict Paul Benedict
              tedymc Tedy Marcos Colombini
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: