Editor does not save in IE11?

Editor does not save in IE11?

rostrost Posts: 26Questions: 9Answers: 1

Hi everybody,
as described and demonstrated in detail by Clancycoop
(https://datatables.net/forums/discussion/comment/183225#Comment_183225),
Testcase http://live.datatables.net/zuxusose/1/edit
Editor in IE11 (under certain circumstances?) does not save edited content, nor throws an error - it just hangs up. (The piece works well with modern browsers).
It seems to be a rare situation, because nobody commented but me - or is it a bug / oddity, already recognized by the datatables team?
Best regards, Robert

Answers

  • rostrost Posts: 26Questions: 9Answers: 1

    After some novize-debugging, I found in my case in IE11 is stumbles in a routine which is meant to split some data for a multi-value field (select2).
    Here is the relevant part; it hangs at data.includes("|") saying in IE11 "SCRIPT438: Das Objekt unterstützt die Eigenschaft oder Methode "includes" nicht" / "data.includes undefined", whereas in firefox data.includes("|") returns "true" or "false"

          "columnDefs": [
            {
                  targets: [1,2], render: function (data, type, row) {
                    if (type === 'sp') {
                      if (data != null && data.includes("|")) {
                        return data.split("|");
                      }
                      else {
                        return data;
                      }
                    }
                    return data;
                  },
                  searchPanes: {
                    orthogonal: 'sp',
                    threshold: 1,
                    // combiner: 'and'
                  }
            },
    
  • rostrost Posts: 26Questions: 9Answers: 1

    I tried to give an example at jsbin, whis you can find here: http://live.datatables.net/yidakuto/1/edit; try to let in run in IE11, and you will find the same debugger-message at line 14

  • mguinnessmguinness Posts: 85Questions: 12Answers: 1

    It's because IE doesn't support includes method, but you can add a polyfill to get it working, see below:

    http://live.datatables.net/yidakuto/5/edit

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Nice, thanks for posting,

    Colin

  • rostrost Posts: 26Questions: 9Answers: 1

    Thank you @mguiness, that polyfill fixes the includes-error!
    Unfortunately my problem "editor does not save in IE11" persists anyway... Most enerving I don't get any error message nor some net-traffic i could look at ...

  • kittartarkittartar Posts: 1Questions: 0Answers: 0
    edited January 2021

    @rost
    I've got same situation in IE11 after upgrading editor from 1.9.0 to 1.9.6.
    When clicking on [save] button, nothing fired to server on IE11 while it works on Chrome.
    In my case, originally the fields in datatable [columns]->[editField] properties only cover SOME of the fields defined in dataTable editor. It was working in v1.9.0 but not working in 1.9.6, and my case is solved by putting either ALL or none editor fields in datatable [columns]->[editField] property.

    It's a lil weird, but it's how I solve my IE11 issue on 1.9.6.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    @kittartar Is that the case for you with our examples?

    Allan

This discussion has been closed.