Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

mod_pagespeed breaks forms in IE 8 with Compatability mode #154

Closed
GoogleCodeExporter opened this issue Apr 6, 2015 · 11 comments
Closed

Comments

@GoogleCodeExporter
Copy link

For this, you need to register with www.sellmyretro.com to see it in action.

I have a short form in a html page, which basically has the following code:
                    <form action="/message/compose/TheDome" method="post">
                        <fieldset>
                            <label class="c8">
                                <span class="c11">To:</span>
                                <input type="text" class="text c12 cLast" id="to" name="to" value="TheDome"  onclick="lookupLocal();"/>
                            </label>
                            <div class="clear"></div>


                            <label class="c8">
                                <span class="c11">Subject:</span>
                                <input type="text" class="text c12 cLast" name="subject" value="Re: shipping" />
                            </label>
                            <div class="clear"></div>

                            <label class="c8">
                                <span class="c11">Message:</span>
                                <span class="c12 cLast">
                                <textarea class="c14" cols="14" rows="6" name="msg"><p>Original Messagetextarea></span>
                                </span>
                            </label>
                            <div class="clear"></div>
                            <div class="c8">
                                <button type="submit" class="submit cLast">Submit<img src="/themes/enuukGreen/img/buttonArrow.gif" alt="" /></button>
                                <input type="hidden" name="action" value="add" />
                            </div>
                            <div class="clear"></div>
                        </fieldset>
                        <p>
                        <a class="button" href="/message">Go back to the inbox <img src="/themes/enuukGreen/img/buttonArrow.gif" alt="" /></a>
                        </form>

Now admittedly, there is more than one form on the page - you can see it 
yourself if you join the site and then go to My Messages -> compose.

The form works fine in IE8, Firefox, Opera, Safari with or without 
mod_pagespeed.

However, if I try it in IE8 with compatability mode and mod_pagespeed enabled, 
then the submit button does nothing.  

I disabled mod_pagespeed and the form works again.

I have the following setup for mod_pagespeed:
    ModPagespeedRewriteLevel CoreFilters
    ModPagespeedEnableFilters collapse_whitespace,elide_attributes,outline_css,outline_javascript,
    ModPagespeedEnableFilters combine_css,rewrite_css

Original issue reported on code.google.com by rwap.services on 15 Dec 2010 at 8:22

@GoogleCodeExporter
Copy link
Author

Can you please post the whole html source? Please post both the source with 
mod_pagespeed off and the source when it's on. That could make it easier to 
troubleshoot. Thanks, -Shawn

Original comment by sligocki@google.com on 22 Dec 2010 at 4:03

@GoogleCodeExporter
Copy link
Author

Original comment by sligocki@google.com on 22 Dec 2010 at 4:09

  • Changed state: RequestClarification

@GoogleCodeExporter
Copy link
Author

Source with and without pagespeed on is attached

Original comment by rwap.services on 22 Dec 2010 at 11:23

@GoogleCodeExporter
Copy link
Author

Sorry - files attached now!

Original comment by rwap.services on 22 Dec 2010 at 11:24

Attachments:

@GoogleCodeExporter
Copy link
Author

If I view the html source in IE 8, I can see that IE adds its own controls to 
the form which may be the issue

Original comment by rwap.services on 22 Dec 2010 at 11:25

@GoogleCodeExporter
Copy link
Author

I manually compared the two files and I see a few differences of note:

1. <input id="search-input" type="text" class="text" name="keyword" value=""/>
   gets its type="text" attribute stripped by elide_attributes.
2. <button type="submit"> loses its type="submit" attribute
3. All href= and src= attributes get absolutified in the rewritten html.
4. images get dimensions added
5. JS and CSS inlining & outlining is in full force making detailed hand-diffs 
difficult.


Original comment by jmara...@google.com on 22 Dec 2010 at 1:10

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Your site doesn't seem available and so I can't test this out right now. Can 
you test this with only one filter on at a time and tell us which filters seem 
to be causing the breakage?

Thanks.

Original comment by sligocki@google.com on 22 Dec 2010 at 9:58

  • Changed state: RequestClarification

@GoogleCodeExporter
Copy link
Author

Site was only down for a couple of minutes - now back up.
Having tested it, the filter which breaks the form is

elide_attributes

Original comment by rwap.services on 22 Dec 2010 at 11:23

@GoogleCodeExporter
Copy link
Author

Yep, IE distinguishes:

<button> and <button type="submit">

Original comment by sligocki@google.com on 23 Dec 2010 at 1:53

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Fixed in r327 in trunk.

Original comment by sligocki@google.com on 27 Dec 2010 at 10:12

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Original comment by sligocki@google.com on 27 Dec 2010 at 11:19

  • Added labels: release-note

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant