Editing a post from an iPhone

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sparkybp
    Member
    • May 2014
    • 30
    • 5.0.X

    Editing a post from an iPhone

    When I try to edit one of my posts from an iPhone the screen comes up blank and doesn't show the original post.
    This happens to me and other users also using an iPhone.
    Where should I start?

    not the whole screen comes up blank just the edit box where youd expect the existing post
    Last edited by sparkybp; Wed 21 May '14, 11:18am.
  • Mark.B
    vBulletin Support
    • Feb 2004
    • 24286
    • 6.0.X

    #2
    This is a known bug in 5 that affects most mobile and tablet devices.
    You'll also find line breaks aren't respected when typing a new post - two sides of the same stone really.
    MARK.B
    vBulletin Support
    ------------
    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

    Comment

    • sparkybp
      Member
      • May 2014
      • 30
      • 5.0.X

      #3
      okay, thanks for the heads up.

      Comment

      • glennrocksvb
        Former vBulletin Developer
        • Mar 2011
        • 4011
        • 5.7.X

        #4
        This is a long known issue and also occurs on Android. I'm sure there is a JIRA report for this but I don't have it handy.
        Last edited by glennrocksvb; Wed 21 May '14, 12:07pm. Reason: Oooppss. I didn't reload the page to see the latest replies!

        Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

        Comment

        • Mark.B
          vBulletin Support
          • Feb 2004
          • 24286
          • 6.0.X

          #5
          Originally posted by Glenn Vergara
          This is a long known issue and also occurs on Android. I'm sure there is a JIRA report for this but I don't have it handy.
          There is, for both. I don't have them to hand but I don't believe any fix is imminent.
          MARK.B
          vBulletin Support
          ------------
          My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
          My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

          Comment

          • glennrocksvb
            Former vBulletin Developer
            • Mar 2011
            • 4011
            • 5.7.X

            #6
            I did a quick investigation on why the issue occurs on mobile and here's what I found.

            On mobile, the ckeditor is disabled (for good reason). This is checked when the editor is being initialized after clicking Edit. The initialization fails because the ckeditor is disabled on mobile and this causes the content to not be set in the editor (plain textarea). The editor is only set when initialization succeeds.

            The temporary solution is to copy the entire vBulletin.conversation.bindEditFormEventHandlers function declaration found in js/global.js (see below)

            Code:
            vBulletin.conversation.bindEditFormEventHandlers = function(contentType) {
                ...
                var initializeEditor = function($container, activateEditModeCallback) {
                    ...
                    vBulletin.ckeditor.initEditor($bareEditor, {
                        success: function(ckeditorId) {
                            ...
            
                        },
                        error: function(ckeditorId) {
                            if (typeof activateEditModeCallback == "function") {
                                activateEditModeCallback()
                            }
                            $bareEditor.prop("disabled", false).removeClass("ckeditor-load-on-focus").closest(".js-content-entry").addClass("b-content-entry--no-ckeditor")
                        }, hideLoadingDialog: false})
                    ...
                }
                ...
            }
            and then insert the entire code below with main changes in red and paste it into the footer template (right after js/footer-rollup.js is included).

            Code:
            <script>
            [COLOR=#008000]//insert this right after the {vb:js 1, js/footer-rollup.js} line in footer template[/COLOR]
            [COLOR=#008000]//this overrides the same function in footer-rollup.js[/COLOR]
            vBulletin.conversation.bindEditFormEventHandlers = function(contentType) {
                ...
                var initializeEditor = function($container, activateEditModeCallback) {
                    ...
                    vBulletin.ckeditor.initEditor($bareEditor, {
                        success: function(ckeditorId) {
                            ...
            
                        },
                        error: function(ckeditorId) {
                            if (typeof activateEditModeCallback == "function") {
                                activateEditModeCallback()
                            }
                            [COLOR=#FF0000]$bareEditor.val($bareEditor.next(".ckeditor-auto-load").text());[/COLOR]
                            $bareEditor.prop("disabled", false).removeClass("ckeditor-load-on-focus").closest(".js-content-entry").addClass("b-content-entry--no-ckeditor")
                        }, hideLoadingDialog: false})
                    ...
                }
                ...
            }
            </script>
            Note: I didn't add the entire function for brevity.

            Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

            Comment

            • David Grove
              Senior Member
              • Apr 2008
              • 3507
              • 5.5.x

              #7
              This issue has been fixed in 5.1.3: http://tracker.vbulletin.com/browse/VBV-11764
              ~~~~~

              Comment

              Related Topics

              Collapse

              Working...