Jump to content

InputfieldPageListSelectMultiple module bug


MrEd
 Share

Recommended Posts

Hello, I am not sure if I am the first one to find this bug, but...

How to reproduce:

Create field FieldsetTabOpen (lets name test_tab)

Create field Page (lets name test), choose Multiple pages, and type PageListSelectMultiple

Add the fields to template:

test_tab

test

test_tab_END

The field "test" is not sortable. The reason is because the InputfieldPageListSelectMultiple.init is called before the tabs are rendered.

My very quick workaround was to move the init method call into setTimeout, but I am not sure if this the correct choice.

wire/modules/Inputfield/InputfieldPageListSelect/InputfieldPageListSelectMultiple.module:88 now looks like the line below.
"setTimeout(function() { InputfieldPageListSelectMultiple.init($('#{$this->id}_items')); }, 200);" . 
Link to comment
Share on other sites

Yes, this is the same bug. And it is due to inactive tabs. Inactive tabs are not rendered in browsers for some time, so the javascript has not action there. I don't remmember how I solved it in other simillar situation, but in my case here the setTimeout solves the problem (I know it is not the best solution, but deadline makes to think of workarounds :) )

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...