Select2 dropdown list does not open after second editor openning

Select2 dropdown list does not open after second editor openning

lfabrylfabry Posts: 14Questions: 5Answers: 0

Hi

Have a series of select2 field in my editor form.
Everything works find when i open the editor for the first time. But after closing the editor form, and reoppenning it in create or edit mode, the dropdown field is clickable but nothing appear when clicking on it.
I will need to reload the page to get it working again.

{label: "Select type: ",name: "metadata_field_2",type: "select2",opts: {placeholder: "Select a content type",minimumResultsForSearch: 5,multiple: false,closeOnSelect: false,include_hidden: false}, options: generateTypeList(find_type('content[].type'))},

I upgraded from Select2 4.0.6 to 4.0.13 but not better.
I am using Editor 1.9.2

Any suggestions ?
Thanks in advance

This question has an accepted answers - jump to answer

Answers

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

    As you say, that's not normal behaviour. Are you able to link to your page or create a test case so we can take a look?

    Colin

  • lfabrylfabry Posts: 14Questions: 5Answers: 0

    Hi Colin
    Thank!
    Iy might take some time to isolate the code.
    In the meantime you can take a look at
    https://www.adooh.org/adooh_v4/cpanel/schedules
    I have created a test account for you.
    Your company code is : 1RAH-AV4N
    user : datatable
    pwd : d@t@2020

    Since my last post, it appears that the issue is also common on the entire platform on all datatables Editor forms. And the issue appear as well on the datetime field,

    I suspect that i am having this issue since upgrade to 1.9.2 but have not yet confirmds this by moving back to earlier version

    Many thanks in advance for your help

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

    I've logged in, but can't see a way to reproduce this, the tables are empty and I can't see a way to add new records. Please can you provide steps on how to reproduce the issue, please.

    Colin

  • lfabrylfabry Posts: 14Questions: 5Answers: 0

    Hi Colin
    Sorry , i should have provided a better guideline.

    Once connected, got to https://www.adooh.org/adooh_v4/cpanel/medias
    Click on the media tab.
    then Create a new Media.
    You will see that the media type select2 open up correctly. Then just close. No need to save.
    Then Create again and you see that you cant open the select2 field.
    Then reload and create again et the select2 works again for 1 time only.
    Problem appear for all features in the plattorm

    You can give a try on the schedule tab and the datetime field from and to actually have the same issue.
    Many thanks for taking the time to look at it,

  • akashethikaakashethika Posts: 7Questions: 2Answers: 0

    Any update on this? I am facing same issue.

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

    Sorry @lfabry , your reply slipped through. I took a look again at your site, but cannot see "create a new Media" on the media tab.

    @akashethika - if you could post a link or a test case that demonstrates the issue, we're happy to take a look. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Colin

  • akashethikaakashethika Posts: 7Questions: 2Answers: 0

    Please use the following credentials

    URL: https://ethika.myswish.in
    username: suresh@ethika.co.in
    Password: 8CuZtJw&iJ$hdp@k&N63KMLG

    To replicate the issue,

    1. Login using the above credentials
    2. Visit https://ethika.myswish.in/view-pipeline/?pipelineId=11
    3. Select any record and click on the edit button from the buttons set (as shown in image attached)
    4. Close the edit window and repeat step 3 again
  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    I just tried logging in but those credentials aren't being accepted. Please could you check them,

    Colin

  • akashethikaakashethika Posts: 7Questions: 2Answers: 0

    Updated the password to - Pass@123

    Please let me know if you are still facing any issue there.

  • akashethikaakashethika Posts: 7Questions: 2Answers: 0

    @colin you can access https://ethika.myswish.in/view-pipeline/?pipelineId=132 this URL without Login.

  • lfabrylfabry Posts: 14Questions: 5Answers: 0

    Hi @colin

    "Sorry @lfabry , your reply slipped through. I took a look again at your site, but cannot see "create a new Media" on the media tab."

    I may have not been very accurate in my description above , click on the media menu, then list tab and from there you should see a 'create' button.

    I can't really post a fiddle case, as my platform is a mixed of CodIgniter and Datatables and other js libraries, and it is quite difficult to isolate a simple code. But as explained I am facing the issue on all the object of the platform. You can also go to schedule and create a new schedule. then close and create again.

    Thanks!

  • akashethikaakashethika Posts: 7Questions: 2Answers: 0

    Any update on this? As mentioned in the above comment Please use https://ethika.myswish.in/view-pipeline/?pipelineId=132 to replicate the issue.

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin

    Hi,

    Thanks for the link to a test case.

    I don't have an immediate fix for this I'm afraid - I don't recall having seen anything quite like this before. You have two different versions of jQuery loading on the page (one in jquery.js and one in plugins.min.js.

    Could you remove one please - probably the plugins one?

    Thanks,
    Allan

  • lfabrylfabry Posts: 14Questions: 5Answers: 0

    Hi

    Getting back to this issue as after some code review cleanup and simplifications i realised that the issue remained on .

    I am starting to get a better understanding on what is happenning. As I have removed all usage of selct2 i thought the issue was solved but actually I still have similar issue when trying to upload a file from the same form after a second edit. We need to relad the full page for being able to reload a new page.
    I beleive that those 2 issues are related.

    When looking at the eventListener active on the upload button of the editor form it appears that during the second edit the eventListener is no longer activated for upload button.

    Hoping finding this could ring a bell.

    Further information.
    1. I have just (on 2020 october) updated the server with the latest version of editor and datatable but the issue remains.
    2. The page includes a edit form that includes multiple separate datatables and editors so this is a quite complexe page.

    Let me know what you may need from me to help

    Many thanks in advance

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    edited October 2020

    Sorry - posted a reply in the wrong thread. Removed to avoid confusion!

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Answer ✓

    Could you try removing display: 'envelope', from that Editor? In all honesty, I don't expect it to resolve the issue, but I'm also not sure what else is causing it!

    Did you try going back to Editor 1.9.2? That would be the next thing to try. And then 1.9.3 and 1.9.4 if .2 does fail - so we can narrow it down a bit.

    Apologies I can't do that - I've not managed to replicate the error on my own system.

    Allan

  • lfabrylfabry Posts: 14Questions: 5Answers: 0

    Hi
    Have been trying to get a simple page to sort this issue out.
    It seems that the issue is no longer there if i change the editor params :smile: 'display' from envelope to lightbox.

    Any suggestions on what i may have forgotten if i wish to use the envelope mode?

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin

    I suspect it is a bug in the envelope display controller. I'll need to have a look into that and see exactly what it is doing. I suspect it will be removing the event handlers of the elements in the form - possibly a $().remove() where there should be a $()detach().

    Allan

  • lfabrylfabry Posts: 14Questions: 5Answers: 0

    Thanks allan!
    Yes i suspect this could be something around this.
    Let me know if you need further help on my side.
    I have isolated a form and can make it available online if you think it can help.

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin

    Just to say that this is now fixed in our repo and will be in Editor 1.9.6 which I'll tag and publish either today or at the start of next week.

    Regards,
    Allan

This discussion has been closed.