1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Odd redactor issue

Discussion in 'XenForo Questions and Support' started by Neil E., Sep 24, 2013.

  1. Neil E.

    Neil E. Active Member

    Earlier I posted about styling the redactor box (http://xenforo.com/community/threads/redactor-styling-elements.60160/) and Brogan pointed out how clicking in the text field changes focus and the selected buttons no longer highlight. There is a different problem happening.

    Based on the default package (this support forum) I can use the redactor box to create a reply.
    Step one, click on bold, start typing = created text in bold, bold button stays highlighted
    Step two, click on italics, keep typing = created text in bold italics, both buttons stay highlighted
    Step three, click on underline, keep typing = created text in underlined bold italics, all buttons stay highlighted
    Step four, click on strike through, keep typing = created text in struck through underlined bold italics, all buttons highlighted.
    Step five, backspace the cursor, each button turns off as the text style disappears.
    This works OK.

    In my style, when I do exactly the same thing, the button highlights disappear as soon as text is created. No clicking is done in the text area so there should be no "loss of focus". I have gone back into EXTRA and removed any CSS related to the redactor box. There is no styling done via the Rich Text Editor section in Styling Properties. As far as I can see there is nothing set that would have any bearing on the redactor box, but I still get the button highlight problem. Has anyone else run into this situation?
     
  2. Neil E.

    Neil E. Active Member

    So I went to http://imperavi.com/redactor/ and had a look at their examples. When I tried their text entry fields (their examples already have text inserted) I got the same action as my problem. The buttons did not remain highlighted. So now I'm baffled and it makes me wonder if Mike has tweaked the code so the XF redactor works differently. The redactor change log http://imperavi.com/redactor/log/ shows frequent modifications.
     
    Last edited: Sep 24, 2013
  3. Brogan

    Brogan XenForo Moderator Staff Member

    The implementation here is exactly the same as that available in the .zip in your customer area.
     
  4. Mike

    Mike XenForo Developer Staff Member

    There are A LOT of modifications and we use a very different version. Looking at the original version of Redactor won't really give you much indication about XF's implementation.

    You'll want to take your site back to the default (default style, no add-ons, no file modifications), confirm that the behavior and then build up until the problem comes back so you can determine the cause.
     
  5. Neil E.

    Neil E. Active Member

    I assume "default style" just means deselecting a modified style and selecting the default style.
    "no file modifications" will be the tricky part. I have a lot of direct template edits that will be very time consuming to restore later.
    Is there a quick way to do this? Does exporting a style include all custom phrase changes?
    Changed phrases don't show up in Customized Components.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Create a new style.
     
    Amaury likes this.
  7. Neil E.

    Neil E. Active Member

    The new style functions the same way (button highlight drops out during text entry).

    testtesttesttest
     
  8. Mike

    Mike XenForo Developer Staff Member

    Obviously try 1.2.2, but look at disabling add-ons as well.
     
  9. Neil E.

    Neil E. Active Member

    I'll work on it. The forum has no addons so that part is simple.
     
  10. Neil E.

    Neil E. Active Member

    Successfully updated to 1.2.2 and still have the same behaviour whereby the button highlights go out when text is entered.

    This happens on the default style (no modifications present).

    Click on bold, button highlights, highlight disappears as soon as I type.

    This support forum, this point in message, click on bold (now), the highlight stays on. Click on bold, highlight off.
     
  11. Tracy Perry

    Tracy Perry Well-Known Member

    OK... I "think" I've figured this out. I was using the locally hosted jQuery. Changed over to the Google Ajax API CDN and it started working on my forums. Are you using the locally hosted jQuery?

    EDIT: Weird... it's working with the locally hosted one on ONE of my forums - but using a different forum I have (on a separate server) I had to use the Google one.

    EDIT 2: And now I went back to the locally hosted on the forum I was having the same problem with and it's now working there also. Caching issue?
     
  12. Neil E.

    Neil E. Active Member

    I think you are right. Different browser (IE) I get the expected function. Firefox still gives me the wierd results despite clearing the cache.
    Completely different computer (IE), also works correctly. I'm not going to worry about it at this point. I only looked at the button action after styling the redactor so I thought my changes must have done something.
     

Share This Page