6

I'm trying to use <force:recordEdit> on a Visualforce page via Lightning Out. But there seems to be some rendering issues. Using a standalone Lightning App it looks like this:

enter image description here

Using LightningOut there are a couple of spinners visible forever.

enter image description here

The spinners seam to correspond to the lookup fields. Lookups have missing lookup-buttons in the standalone lightning apps, too. I think this is a bug and might be related to Lightning Components: Using <force:inputField /> on a Lookup only works partly

Looking at the markup, I was able to make some hidden elements visible. Maybe they are even partly functional. Visibility and layout is messed-up at least. See here:

enter image description here

Will this be fixed in either Spring'16 or Summer'16?

Here is the code:

Component

<aura:component >
    <h2>record display component inside</h2>    
    <force:recordEdit aura:id="edit" recordId="001g000000mGaZQ"/>
    <ui:button class="elfSave" label="Save" press="{!c.save}"/>
</aura:component>

Controller

({
    save : function(component, event, helper) {
        component.find("edit").get("e.recordSave").fire();
    },
})

outApp

<aura:application access="GLOBAL" extends="ltng:outApp">
    <aura:dependency resource="c:elfLCX_recordEdit"/>   
</aura:application>

Page

<apex:page standardController="Account" >
    <apex:includeLightning />
    <div id="elfLCX_recordEditWrapper"></div>
    <script type="text/javascript">          
        $Lightning.use("c:elfLCX_out", function() {
            $Lightning.createComponent(
                "c:elfLCX_recordEdit"
                ,{ label : "Record Edit"}
                ,"elfLCX_recordEditWrapper"
                ,function(cmp) {
                   // do some stuff
                }
            );
        });   
    </script>
</apex:page>
6
  • Do you see any errors in the developer console of your web browser? Feb 3, 2016 at 15:20
  • 1
    I wish I would! Lightning is doing a great job in try-catching most errors, hiding them effectively and sometimes showing them (if you are lucky) in custom popups... It's really rare that you get something in the console, which is very sad, because debugging suffers a lot. So the answer is: no, there is no error in the console.
    – Uwe Heim
    Feb 3, 2016 at 15:25
  • I believe this is purely a CSS collision issue and would not result in any javascript exceptions. This is also the first report we've had of this so far so no planned fix has even been discussed yet. Please open a case so it can go through the normal support process. I am checking out what I think is the main issue (lack of resetCss.css being auto injected like it is for a standalone .app - can't be auto injected because we know it breaks some things in Visualforce). Feb 3, 2016 at 16:22
  • FYI I'm not ale to repro this using force:recordEdit directly (not wrapped in a custom LC) on WInter'16. Digging more. Feb 3, 2016 at 16:31
  • Hi Dough, think it's not 100% CSS. I found there is at least on div (lookup__menu uiAbstractList uiAutocompleteList uiInput uiInput--default uiInput--lookup) which seems to be sized with an elements-style (at width: 139px). If I open such a case, support will close it again, I have no premier support.
    – Uwe Heim
    Feb 3, 2016 at 16:34

1 Answer 1

1

I am unable to repro this on Winter'16 with you exact sample in my DE org. Lookups etc all look and function correctly. Even the custom save button works properly. I'm switching to a Spring'16 org now to see if it is release specific.

enter image description here

enter image description here

6
  • Hi Doug, I can confirm now, it happens only on the Spring'16 sandbox and not on a Winter'16 DE - so it looks release specific to me.
    – Uwe Heim
    Feb 3, 2016 at 18:10
  • Yes, I am able to repro now in a Spring'16 DE org too and I am digging in. Feb 3, 2016 at 19:13
  • That's very cool. I'm sure I could hack it somehow, but it's way better handled on your end. Btw. my idea is to use this baby, wrap it into a VF compo to solve this long awaited feature request here success.salesforce.com/ideaView?id=08730000000BrQtAAK - I'm pretty sure it will work ;-)
    – Uwe Heim
    Feb 3, 2016 at 19:21
  • Hi Doug, as you requested, I've opened a case 13096260, which is now closed. If you need the case for the process, please reopen it.
    – Uwe Heim
    Feb 9, 2016 at 11:12
  • @UweHeim Did you get it working ? i am facing the same issue. May 25, 2017 at 7:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.