Details

    • Testing Instructions:
      Hide

      1. Create any entity (f.e. add Page resource) and in the description field decorate some text with both bold and italic (try applying bold first and italic second and vice versa)
      2. Save the page and view it. Text should be both bold and italic

      Show
      1. Create any entity (f.e. add Page resource) and in the description field decorate some text with both bold and italic (try applying bold first and italic second and vice versa) 2. Save the page and view it. Text should be both bold and italic
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
      git@github.com:marinaglancy/moodle.git
    • Pull Master Branch:
      wip-MDL-25125-master
    • Rank:
      924

      Description

      I have checked on the QandA site with several different themes.
      If you make text both bold and italic, and then save, the "boldness'' will not be displayed.
      If you make it bold, italic, underlined, then italic will disappear.

      1. styles.htm
        0.7 kB
        Mauno Korpelainen
      2. yuireset.patch
        2 kB
        Chris Follin
      1. 1_ 2_ 3_ 4.jpg
        5 kB
      2. texteditor.png
        21 kB

        Activity

        Hide
        Helen Foster added a comment -

        Elena, thanks for your report. Assigning to the HTML editor component lead.

        Show
        Helen Foster added a comment - Elena, thanks for your report. Assigning to the HTML editor component lead.
        Hide
        Mauno Korpelainen added a comment -

        Hi Helen and Elena,

        It looks like TinyMCE might not cause this problem at all - it renders valid code and shows valid code in editor itself but some styles vanish on pages of moodle
        Looking at source only option 4) is shown correctly in moodle

        1) <p><span style="text-decoration: underline;"><em><strong>Test text</strong></em></span></p>
        2) <p><strong><span style="text-decoration: underline;"><em>Test text</em></span></strong></p>
        3) <p><em><strong><span style="text-decoration: underline;">Test text</span></strong></em></p>
        4) <p style="font-style: italic; font-weight: bold; text-decoration: underline;">Test text</p>

        even if all of these are shown ok on any web page. It is possible to edit valid_elements code in tinymce init code to make tinymce render only style tags 4) but it does not make much sense since <em> and <strong>should be ok as well. Strange!

        Show
        Mauno Korpelainen added a comment - Hi Helen and Elena, It looks like TinyMCE might not cause this problem at all - it renders valid code and shows valid code in editor itself but some styles vanish on pages of moodle Looking at source only option 4) is shown correctly in moodle 1) <p><span style="text-decoration: underline;"><em><strong>Test text</strong></em></span></p> 2) <p><strong><span style="text-decoration: underline;"><em>Test text</em></span></strong></p> 3) <p><em><strong><span style="text-decoration: underline;">Test text</span></strong></em></p> 4) <p style="font-style: italic; font-weight: bold; text-decoration: underline;">Test text</p> even if all of these are shown ok on any web page. It is possible to edit valid_elements code in tinymce init code to make tinymce render only style tags 4) but it does not make much sense since <em> and <strong>should be ok as well. Strange!
        Hide
        Mauno Korpelainen added a comment -

        Attached a simple html file that can be opened separately with any browser - those same tags should look ok there (similar underlined, bold and italics style Test text)

        Show
        Mauno Korpelainen added a comment - Attached a simple html file that can be opened separately with any browser - those same tags should look ok there (similar underlined, bold and italics style Test text)
        Hide
        Mauno Korpelainen added a comment -

        And in attached image 1_2_3_4.jpg the result that moodle renders. They should all look like example 4)

        Show
        Mauno Korpelainen added a comment - And in attached image 1_2_3_4.jpg the result that moodle renders. They should all look like example 4)
        Hide
        Mauno Korpelainen added a comment -

        Could some filter cause this ???

        Show
        Mauno Korpelainen added a comment - Could some filter cause this ???
        Hide
        Elena Ivanova added a comment -

        My test instance had no filters active - and it was doing the same :/

        Show
        Elena Ivanova added a comment - My test instance had no filters active - and it was doing the same :/
        Hide
        didier Belot added a comment -

        Firebug seems to show that a css rule is resetting em to font-style: normal

        http://localhost/moodle/theme/yui_combo.php?3.2.0/build/cssreset/reset-min.css&3.2.0/build/cssfonts/fonts-min.css&3.2.0/build/cssgrids/grids-min.css&3.2.0/build/cssbase/base-min.css, line 8:

        address, caption, cite, code, dfn, em, strong, th, var

        { font-style: normal; font-weight: normal; }
        Show
        didier Belot added a comment - Firebug seems to show that a css rule is resetting em to font-style: normal http://localhost/moodle/theme/yui_combo.php?3.2.0/build/cssreset/reset-min.css&3.2.0/build/cssfonts/fonts-min.css&3.2.0/build/cssgrids/grids-min.css&3.2.0/build/cssbase/base-min.css , line 8: address, caption, cite, code, dfn, em, strong, th, var { font-style: normal; font-weight: normal; }
        Hide
        Mauno Korpelainen added a comment -

        This yui reset code is really starting to stink 8-[

        Just as stuped css rules as superscript and subscript reset code in http://tracker.moodle.org/browse/MDL-25565

        These tags are supported in all major browsers and one yui reset rules breaks css of all such tags where you have tags different font-styles or font-weights inside each other.

        Show
        Mauno Korpelainen added a comment - This yui reset code is really starting to stink 8-[ Just as stuped css rules as superscript and subscript reset code in http://tracker.moodle.org/browse/MDL-25565 These tags are supported in all major browsers and one yui reset rules breaks css of all such tags where you have tags different font-styles or font-weights inside each other.
        Hide
        Chris Follin added a comment -

        I'm attaching a patch based on Orestes Mas' suggestion in this discussion: http://moodle.org/mod/forum/discuss.php?d=168169

        I did some basic testing and it seems to work.

        Show
        Chris Follin added a comment - I'm attaching a patch based on Orestes Mas' suggestion in this discussion: http://moodle.org/mod/forum/discuss.php?d=168169 I did some basic testing and it seems to work.
        Hide
        Michael Blake added a comment -

        Increasing priority as this has been reported as a problem for a MP. Please test patch asap.

        Show
        Michael Blake added a comment - Increasing priority as this has been reported as a problem for a MP. Please test patch asap.
        Hide
        Michael Blake added a comment -

        Please give this issue priority; reported as a problem on MP sites.

        Show
        Michael Blake added a comment - Please give this issue priority; reported as a problem on MP sites.
        Hide
        Michael de Raadt added a comment -

        Just a note to say that we are planning to give this some attention after Moodle 2.1 is released.

        We have just updated the TinyMCE editor component and we will be reviewing issues related to that component after 2.1.

        Michael;

        Show
        Michael de Raadt added a comment - Just a note to say that we are planning to give this some attention after Moodle 2.1 is released. We have just updated the TinyMCE editor component and we will be reviewing issues related to that component after 2.1. Michael;
        Hide
        Marina Glancy added a comment -

        This issue is a YUI bug in CSS. There are quite a few discussions in internet. Unfortunately it is not fixed in 3.3.0.

        In order not to loose changes when the YUI is upgraded, the CSS fix is added to the base theme css.

        TinyMCE has nothing to do with that. In fact, if you look at the html source you will see that all tags are present.

        Show
        Marina Glancy added a comment - This issue is a YUI bug in CSS. There are quite a few discussions in internet. Unfortunately it is not fixed in 3.3.0. In order not to loose changes when the YUI is upgraded, the CSS fix is added to the base theme css. TinyMCE has nothing to do with that. In fact, if you look at the html source you will see that all tags are present.
        Hide
        Petr Škoda added a comment -

        Integrated, thanks.

        Show
        Petr Škoda added a comment - Integrated, thanks.
        Hide
        Petr Škoda added a comment -

        Tested in all supported browsers - fails only in IE6&7 which is fine.

        Show
        Petr Škoda added a comment - Tested in all supported browsers - fails only in IE6&7 which is fine.

          People

          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: