After Inline Edit, Cannot Do Another Edit?

After Inline Edit, Cannot Do Another Edit?

vmanvman Posts: 35Questions: 3Answers: 0

Hey guys!
I'm coming across multiple issues with 1.10 when it comes to inline editing, I wanted to know if there is a fix for this.

When I go to inline edit I can open the box, make a single edit, and then never open it again until I refresh the page. Anyone else with this issue? I'm using the basic editing code.

// Inline Editing
    $(mainTable).on('click', 'tbody td.inlineEdit', function (e) {
        if($(this).hasClass('dropdownEdit')) 
        {
            console.log("NOOO");
            editor.inline(this, {
                "submitOnBlur": true
            });
        }else
        editor.inline(this, {
            "closeOnComplete": false
        });
        curCellVal = $('div.DTE_Field_Input > input').val() == undefined ? $('div.DTE_Field_Input > select').val() : $('div.DTE_Field_Input > input').val();
    });
«1

Answers

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    That looks like it should work okay. Are you using Editor 1.3.2? There was a bug in some conditions with inline Editor in 1.3.1, particularly in IE>

    Failing that, can you link me to the page showing the error so I can take a look and see what is going on?

    Thanks,
    Allan

  • vmanvman Posts: 35Questions: 3Answers: 0

    I just went through and updated everything, I seem to be getting farther but I still manage to close to the form when I jump to the next column. It will be open for a split second and seem like it just got told to close. I'm not sure if there is a setting preventing this from working, but from what I can tell it seems to be something up with the ajax command. Is there a website I can go to that will allow you to debug, I cannot post a login to the table publicly, I do apologize.

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    Does the error occur for you in my examples on the Editor site? I'd need a way to reproduce the error to be able to debug and resolve it.

    You could also drop me an e-mail allan @ this domain.net, with the full code that you are using for Editor.

    Allan

  • vmanvman Posts: 35Questions: 3Answers: 0

    The error does not occur which is why I'm so confused with it. So I'm trying to do compares against the side code to figure out what is wrong.

  • r1andreasr1andreas Posts: 7Questions: 0Answers: 0

    Hi. I'm having the same problem. it works fine in firefox, but in IE11 I have to recreate the table after each inline edit.

    IE seems to lose the column context. let's say I have a table with 3 columns. when I inline edit column 1, then click on the edit button, I only see columns 2 and 3 for editing.

    one difference between my code and your sample on the page is how you fill the datatables. I create the html table completely, then run datatable(). That way your internal code can only work with column IDs, not the column names - and I think you have a bug in there, at least with IE

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    @r1andreas - Are you using Editor 1.3.2?

    Allan

  • r1andreasr1andreas Posts: 7Questions: 0Answers: 0

    yes.

    I'm working as a consultant for a microsoft partner, so IE is important for this project. the workaround at the moment is to recreate the table after each edit. which is ok in cases where we need to recalculate the table data, but in other cases it is cumbersome.

    as we bought this product, and this is clearly a bug, it would be great, if you could look into it. let me know how I can help. I can't share the code, but I could send you a file with the code I use to init the datatables and editor?

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    Yes, please do send me the file ( allan @ this domain.net ) so I can look into it and address the issue.

    Or alternatively, if you can give me instructions on how to reproduce the error using any of my examples ( http://editor.datatables.net/examples ) that would be great.

    Allan

  • vmanvman Posts: 35Questions: 3Answers: 0

    I fixed the issue, it took some modification to the Editor code itself, but now it is working fine. Seemed to be an on('blur') issue. Didn't seem to like .blur() I am now fighting with strictly IE where it is blanking out the fields on the tab submit.

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    Are you able to let me know what your fix was? I've still not been able to reproduce this error myself.

    Allan

  • vmanvman Posts: 35Questions: 3Answers: 0
    edited August 2014

    Basically I just made sure I wasn't refreshing the table by using ajax.reload(null, true) and also in the editor code source on line 2313 where js that.blur(); is, it should be js that.on('blur'); that seemed to fix my issues. Now I'm just having issues with Inline Edits on Internet Explorer 8 to 11 where they can only inline edit the columns they do their first edit on.

    Also, I added a few things to editor which will bite me later on, but the ajax won't submit unless a change has been made to the field. Creates a lighter load on the server instead of submitting every time someone hits tab, can create a more efficient way of working as well.

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    Thanks for the feedback - munch appreciated!

    Now I'm just having issues with Inline Edits on Internet Explorer 8 to 11 where they can only inline edit the columns they do their first edit on.

    I've had a couple of other reports of that, but haven't been able to reproduce the error myself. Can you link me to the page that you are seeing that error on so I can work on it?

    Thanks,
    Allan

  • vmanvman Posts: 35Questions: 3Answers: 0

    I actually experienced this on the demo page for Submit On Blur when tabbing through the columns. I've come across this issue multiple time on the demo page already, it seems to be a focus(); or at least that is what I keep reading about. But I can't find a work around.

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    Thanks, I'll try it again on my PC when I get into the office tomorrow.

    Allan

  • vmanvman Posts: 35Questions: 3Answers: 0

    Any luck with the IE issue? I can't seem to figure out a fix for it. I came across performance improvements when I added submitOnBlur only on change feature. But other than that I can't find what is wrong with the IE version.

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    I've just been looking into it, and it would appear that the tab example has a ajax.reload() in a setInterval for some reason. I'm not sure what that is doing there, I'm just to remove it from the example, but that appears to be what is causing the problem for me.

    If you have a similar setInterval in your code, could you remove it and see if that helps?

    Allan

  • vmanvman Posts: 35Questions: 3Answers: 0

    setInterval? Huh, I'll have to look at that. It could be what the problem but I'm not 100% sure. I'll keep you updated.

  • vmanvman Posts: 35Questions: 3Answers: 0

    Just checked, I do not have the same in my code. I have a setInterval to refresh the table every 10 minutes of inactivity, but other than that nothing relating to it. I cannot seem to find the issue, but it is an issue on every machine I test.

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    Darn - okay, I'll try to reproduce the issue again this afternoon, but it did seem to be working in my examples without the setInterval.

    Allan

  • vmanvman Posts: 35Questions: 3Answers: 0
    edited August 2014

    Hey Allan, I've been working on the issue but still making little progress I have a full way of reproducing the issue.

    IE 9, 10, 11:

    1. Select a field for Inline Edit, let the editor work its magic to open the <input />
    2. Edit box, any value.
    3. Tab to next field (or select) and there will be the value there until you input a new value.

    That is what keeps happening for me, I thought I got it by using an alternate .focus() method but that isn't the issue after all. Looking into jQuery IE issues now.

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    Thanks for the details. I've just tried the 3 point instructions on this example in IE and it appears to work as expected.

    There is one possibility that occurs to me - there is an error on the second submit. Checking the browser's Ajax options in the dev tools will confirm if this is case or not.

    It would be really useful if you could link me to the page you are having a problem with so I can debug it.

    Allan

  • vmanvman Posts: 35Questions: 3Answers: 0

    I'm making an account for you, I need an email address and I can send you a link to the system.

  • vmanvman Posts: 35Questions: 3Answers: 0

    Just kidding, you already posted your email. Created your account, everything should be in the confirmation email sent.

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    Hi,

    I don't appear to have an e-mail from you. Possibly it was picked up by my spam filter, but I don't see it on a quick scan. What was the domain it would have come from?

    Allan

  • r1andreasr1andreas Posts: 7Questions: 0Answers: 0

    hi,

    sry, I had a small vacation. I've recorded a small video, where you can see the behaviour. firefox works, IE not:

    https://www.youtube.com/watch?v=txMm-Zot7Tg

    I'd like you send you the code, but what is "this domain"? @datatables.net does not exist

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    allan @ datatables.net :-)

    Allan

  • r1andreasr1andreas Posts: 7Questions: 0Answers: 0
    edited August 2014

    there is also another bug when you press the 'Esc' key to cancel the inline edit on certain conditions (press esc quickly a few times, tab into a select list field, then esc)

    I generally use: submitOnBlur: true

    so I get the same behaviour, when I change to editor code to this:

    else if ( e.keyCode === 27 ) {
    e.preventDefault();
    if (!$('div.DTE_Inline').length) that._close(); else that.submit();
    }

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    Hi,

    Thanks for the e-mail. Sorry for the deeply in replying - I've only just managed to have a look at it.

    Is there any way you can link me to the page showing the problem? I don't see anything in the Javascript that would cause the issue. Having said that, I will try to recreate the problem with your code locally, but it will take a little bit of time to built it into a working page accurately.

    Allan

  • vmanvman Posts: 35Questions: 3Answers: 0

    So, I've done a ton of exploring and thank you Allan for your help this morning.
    Finding out we have a newer version of IE on the machine I was testing on.
    Both are IE 11, but just different versions. The one that works is...
    Works: V. 11.0.9600.16663 and 11.0.9600.17105
    Does Not Work: 11.0.9600.16384

    This is a weird issue but seems to be resolved on more updated systems. Basically if you get a bad install everything goes bad. I can't seem to figure out why or what is causing the issue but it seems to fix itself in newer versions of IE.

  • r1andreasr1andreas Posts: 7Questions: 0Answers: 0

    my IE is: 11.0.9600.17239, and it does not work..

    pls try to debug it locally on your machine - atm I can't give you access to a site which shows this error

This discussion has been closed.