Announcement

Collapse
No announcement yet.

Editing a post from an iPhone

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • David Grove
    replied
    This issue has been fixed in 5.1.3: http://tracker.vbulletin.com/browse/VBV-11764

    Leave a comment:


  • Glenn Vergara
    replied
    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>
    //insert this right after the {vb:js 1, js/footer-rollup.js} line in footer template
    //this overrides the same function in footer-rollup.js
    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.val($bareEditor.next(".ckeditor-auto-load").text());
                    $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.

    Leave a comment:


  • Mark.B
    replied
    Originally posted by Glenn Vergara View Post
    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.

    Leave a comment:


  • Glenn Vergara
    replied
    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 Glenn Vergara; Wed 21st May '14, 1:07pm. Reason: Oooppss. I didn't reload the page to see the latest replies!

    Leave a comment:


  • sparkybp
    replied
    okay, thanks for the heads up.

    Leave a comment:


  • Mark.B
    replied
    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.

    Leave a comment:


  • sparkybp
    started a topic Editing a post from an iPhone

    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 21st May '14, 12:18pm.

Related Topics

Collapse

Working...
X