Skip to content

wakeupValue() being called on fields in AJAX loaded tab before it is viewed. #1650

Open
@adrianbj

Description

@adrianbj

Short description of the issue

If you have a fieldsetTab, the wakeupValue() of the contained fields is called on page load - it doesn't wait until the tab is loaded.

Expected behavior

wakeupValue() would not be called until the tab is opened.

Actual behavior

Whenever you load a page for editing, the wakeupValue() for fields in an AJAX loaded tab is called immediately. This isn't a huge deal for simple fields, but when the tab contains large table fields or RuntimeOnly fields, then this negates most of the advantage of the AJAX loading. Note the render() does wait to be called (as expected), but that's not enough to help with the performance, especially if the tab contains a table field that is locked for editing.

Steps to reproduce the issue

  1. Add a Table field to an AJAX loaded fieldset Tab.
  2. Load the page for editing. If you add bd('test'); to the __wakeupValue() method in FieldtypeTable.module you'll see it fires even before you view the tab.

Note that the "Open in Modal Window" option works as expected, but it's not really a great user experience so it would be great to be able to have the same speed improvements with the AJAX loaded option.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions