2 Replies Latest reply on May 9, 2008 8:15 AM by jeffguinness

    Hidden cursor in input fields

    jeffguinness

      I'm using Firefox on Windows and showing a modalPanel with input fields when the page loads results in an invisible cursor. Moving the modelPanel a couple of pixels by clicking the title bar and dragging causes the cursor to appear.

      I have tried showing the modalPanel by using

      showWhenRendered="true"
      and by calling
      Richfaces.showModalPanel('mp2');
      when the page loads. The results are the same.

      This seems to be the same problem as RF-2890 except this occurs this is on page load. http://jira.jboss.com/jira/browse/RF-2890?page=all

      Another issue I have seen is that
      left="auto"
      does not work on page load, but works fine when showing the modalPanel at other times.

      I am using RichFaces 3.2.0.SR1.

      <rich:modalPanel id="mp2" autosized="true" left="auto" top="10" resizeable="false" zindex="2000" showWhenRendered="true">
       <f:facet name="header">
       <h:outputText value="Modal Panel Title" />
       </f:facet>
      
       <h:panelGrid>
       <a4j:form id="productLineOptionForm" ajaxSubmit="true" oncomplete="Richfaces.hideModalPanel('mp2')">
       <h:panelGrid columns="2">
       <h:outputLabel>Name:</h:outputLabel><h:inputText id="test1"/>
       <h:outputLabel>Value:</h:outputLabel><h:inputText id="test2"/>
       </h:panelGrid>
       <h:commandButton id="close" value="Close" />
       </a4j:form>
       </h:panelGrid>
       </rich:modalPanel>
      


        • 1. Re: Hidden cursor in input fields
          ma.aqcon

          Have u tried to set the focus to your input field with

          <rich:modalPanel ... onshow="document.getElementById('form:field_id').focus();" ...>
          

          ?
          That works for me.

          • 2. Re: Hidden cursor in input fields
            jeffguinness

            Giving any control the focus, either by

            onshow="document.getElementById('form:test1').focus();"
            or even by clicking into the inputText, does not result in the cursor appearing when the page containing the modalPanel is first loaded. The cursor works fine if I either move the modal by clicking on and dragging the title bar or after closing the modalPanel and then showing it again.