responsive works on desktop/chrome emulator not on iphone 5 device

responsive works on desktop/chrome emulator not on iphone 5 device

Barry0310Barry0310 Posts: 5Questions: 1Answers: 0

Hello All,

I have search this issue on google for a long time, can someone help me.
I used datatables on bootstrap and also added <meta name="viewport" content="width=device-width,initial-scale=1"> on head tag.

So the responsive is good on the emulator -> see the OK.png.
but on the real device, I can't not see the responsive -> see the Fail.png

Thanks in advance.

Barry

This question has accepted answers - jump to:

Answers

  • Barry0310Barry0310 Posts: 5Questions: 1Answers: 0

    This iPhone 5 real device-width is 320px, but I think the datatables responsive function detect the device-width is 640px.
    Can someone give me a advise to set the css or attribute?

    I really need the datatables responsive function to fit the real device-width.
    Thanks so much.

  • allanallan Posts: 62,057Questions: 1Answers: 10,173 Site admin
    Answer ✓

    Thanks for your question. We'd need a link to a test case showing the issue. The Responsive examples appear to work okay on my iPhone 6 (can't test on a real iPhone 5 as I don't have one I'm afraid).

    Allan

  • Barry0310Barry0310 Posts: 5Questions: 1Answers: 0

    Thanks Allan.

    I have referred the The Responsive examples you provided.
    Can I ask how to add a close button on the modal form's header?

    I know if I click the outside of modal form, it will colse.
    But I use the iPhone 5, this modal form already cover all screen, it is hard to colse it.
    Thanks for your help.

    Barry

    // Javascript
    display: $.fn.dataTable.Responsive.display.modal({
    header: function (row) {
    var data = row.data();
    return 'Details for ' + data[0] + ' ' + data[1];
    }
    }),

  • allanallan Posts: 62,057Questions: 1Answers: 10,173 Site admin
    Answer ✓

    Can I ask how to add a close button on the modal form's header?

    I assume you are referring to the Bootstrap modal example? That it is missing the close button is a bug - thanks for reminding me about it. I'll fix it at the start of the week.

    Allan

  • Barry0310Barry0310 Posts: 5Questions: 1Answers: 0

    Thanks allan for your help. It's so gald to hear this.

  • allanallan Posts: 62,057Questions: 1Answers: 10,173 Site admin
    Answer ✓

    Fix committed. The nightly built will rebuild with the change in about 5 minutes.

    Regards,
    Allan

  • Barry0310Barry0310 Posts: 5Questions: 1Answers: 0

    Hi allan,

    I have downloaded the lastest responsive.bootstrap.js, I can see the close button of the popup modal form.
    So thanks for your help.

    Barry

This discussion has been closed.