[jira] Created: (TAPESTRY-2503) A space is added to a HTML start comment sequence making it impossible to add IE conditional comments

View: New views
3 Messages — Rating Filter:   Alert me  

[jira] Created: (TAPESTRY-2503) A space is added to a HTML start comment sequence making it impossible to add IE conditional comments

by Tapestry - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

A space is added to a HTML start comment sequence making it impossible to add IE conditional comments
------------------------------------------------------------------------------------------------------

                 Key: TAPESTRY-2503
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2503
             Project: Tapestry
          Issue Type: Bug
          Components: Framework
    Affects Versions: 5.0.13
            Reporter: Martijn Brinkers


I tried to add an Internet Explorer conditional style to solve some rendering differences between IE and FF. To way to add conditional comments is by using the following syntax

<!--[if IE]>
Special instructions for IE here
<![endif]-->

The problem is that Tapestry adds a space between <!-- and [if IE]

example: <!--[if IE]> becomes <!-- [if IE]>  (note the added space)

IE only accepts the conditional comment if there is no space between <!-- and [if IE]
 

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


[jira] Closed: (TAPESTRY-2503) A space is added to a HTML start comment sequence making it impossible to add IE conditional comments

by Tapestry - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/TAPESTRY-2503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAPESTRY-2503.
------------------------------------------

    Resolution: Won't Fix
      Assignee: Howard M. Lewis Ship

There is an easy workaround: use the writeRaw() method.

> A space is added to a HTML start comment sequence making it impossible to add IE conditional comments
> ------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2503
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2503
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 5.0.13
>            Reporter: Martijn Brinkers
>            Assignee: Howard M. Lewis Ship
>
> I tried to add an Internet Explorer conditional style to solve some rendering differences between IE and FF. To way to add conditional comments is by using the following syntax
> <!--[if IE]>
> Special instructions for IE here
> <![endif]-->
> The problem is that Tapestry adds a space between <!-- and [if IE]
> example: <!--[if IE]> becomes <!-- [if IE]>  (note the added space)
> IE only accepts the conditional comment if there is no space between <!-- and [if IE]
>  

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


[jira] Commented: (TAPESTRY-2503) A space is added to a HTML start comment sequence making it impossible to add IE conditional comments

by Tapestry - Dev mailing list :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/TAPESTRY-2503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613113#action_12613113 ]

Martijn Brinkers commented on TAPESTRY-2503:
--------------------------------------------

Workaround (found on mailinglist) is to create a  ConditionalComment component.

Usage example:

        <!-- IE requires a change to the error style -->
        <t:ConditionalComment t:condition="IE">
                <style>
                  HTML BODY DIV.t-error LI {
                    margin-left: 20px;
                        }
                </style>    
        </t:ConditionalComment>


package mitm.mimesecure.web.components;

import org.apache.tapestry5.BindingConstants;
import org.apache.tapestry5.MarkupWriter;
import org.apache.tapestry5.annotations.AfterRender;
import org.apache.tapestry5.annotations.BeginRender;
import org.apache.tapestry5.annotations.Parameter;

public class ConditionalComment
{
        @Parameter(required = true, defaultPrefix = BindingConstants.LITERAL)
        private String condition;

        @BeginRender
        public void beginRender(MarkupWriter writer)
        {
                writer.writeRaw("<!--[if ");
                writer.writeRaw(condition);
                writer.writeRaw("]>\n");
        }

        @AfterRender
        public void afterRender(MarkupWriter writer) {
                writer.writeRaw("<![endif]-->");
        }
}

> A space is added to a HTML start comment sequence making it impossible to add IE conditional comments
> ------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2503
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2503
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 5.0.13
>            Reporter: Martijn Brinkers
>            Assignee: Howard M. Lewis Ship
>
> I tried to add an Internet Explorer conditional style to solve some rendering differences between IE and FF. To way to add conditional comments is by using the following syntax
> <!--[if IE]>
> Special instructions for IE here
> <![endif]-->
> The problem is that Tapestry adds a space between <!-- and [if IE]
> example: <!--[if IE]> becomes <!-- [if IE]>  (note the added space)
> IE only accepts the conditional comment if there is no space between <!-- and [if IE]
>  

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

LightInTheBox - Buy quality products at wholesale price