function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dkclxdkclx 

Field with issue on InlineEdit

Is there a way to style/control the field width on the input box for inlineEditSupport?  Right now it's defaulting to 149px which is too narrow for the particular field when you double-click to edit it.  I can control the width of the outputfield just not once you double-click to do inlineEdit.

 

<apex:outputField style="width:500px;" value="{!quoteline.Product_Description__c}">
     <apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
	hideOnEdit="editButton" event="ondblclick" resetFunction="resetInlineEdit"/>
</apex:outputField>

 

Starz26Starz26

 try adding some css on the page to set the width of the field when it changes to an input.

Starz26Starz26

the css

 

input:focus{

width: 300px;

}

 

makes any input element that is being edited a width of 300px and it goes back to normal when the editing is done

dkclxdkclx

Thanks for the reply.  Tried that ... actually that does work except it also makes every other input field change their width when you click in them.  I need to have this apply only to a particular field.

Starz26Starz26

It works fine when I used it....

 

<style>

input:focus{

width: 300px;

}

</style>

placed near the top of the page

 

is what I have. when double clicking on the field and it changes to edit, the width becomes 300px...

 

Not sure why it is not working for you...

 

I was using firefox.....

dkclxdkclx

Sorry .. you must've seen my first reply.  It does work, but it does it for any and all fields on the page.  I need to be able to apply it just to specific fields.