4 Replies Latest reply on Jan 25, 2016 9:43 AM by Gopal Herkal

    Chrome 44 version tabindex is not working.

    Gopal Herkal Newbie



      I know this is a browser specific issue but I just thought this is the best forum i know to bring the issue up.


      Only in Chrome 44 version when I click on text box field and then press tab key , instead of going to next field the cursor moves to the URL of the browser.

      It works in Mozilla, Chrome<44 versions.


      This is my code screenshot:


      Kindly help.

        • 1. Re: Chrome 44 version tabindex is not working.
          Michal Petrov Master

          Wouldn't it be easier to just paste the code? Not to mention that if someone wanted to check it out for themselves they'd have to transcribe the code off the picture and nobody is going to do that.


          Does it happen with a specific input or with any one? The browser will switch focus on keydown, so the onkeypress interceptors you have there aren't working correctly.

          • 2. Re: Chrome 44 version tabindex is not working.
            Gopal Herkal Newbie

            Hi Michal,

            Sorry about the screenshot paste. Actually I have to code using client machine. So it takes a while to send code from client machine to my machine.

            With input/no input the behaviour is same, the cursor gets moved to the URL.


            Please find below the code:

            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


            <!--Display page to add vendors in the production  -->

            <html xmlns="http://www.w3.org/1999/xhtml"









                <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

                <link href="#{request.contextPath}/resources/framework/css/styles.css"

                    rel="stylesheet" type="text/css"></link>





                    <rich:popupPanel id="popup-add-vendor" modal="true" autosized="true"

                        resizeable="false" width="600"



                        <div id="header" style="white-space: nowrap;">



                                    <td><h:graphicImage name="framework/img/brand-logo.png"

                                            alt="brand-logo" /></td>



                        border:1px solid;padding:1px 2px 1px 2px;line-height:50%;display:inline-table;"

                                            action="#{addVendor.clearFields}" execute="@form"


                                            oncomplete="#{rich:component('popup-add-vendor')}.hide();return false;">x</a4j:commandLink>






                        <br />


                        <h:outputText value="#{fwlbl.add_vendor}"

                            style="font-size:24px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif; margin-left:228px;" />

                        <br />

                        <br />


                        <br />

                        <div id="textBox">

                            <h:outputText value="Vendor Number"></h:outputText>

                            <h:inputText id="vendorNbr" value="#{addVendor.vendorNbr}"


                                onkeypress="if(event.keyCode==9 ||event.which==9){event.preventDefault();document.getElementById('form1:division').focus();}"

                                style="margin-left:21px;margin-bottom:6px;" maxlength="12">


                            <br />

                            <h:outputText value="Division"></h:outputText>

                            <h:inputText id="division" value="#{addVendor.division}"


                                onkeypress="if(event.keyCode==9 ||event.which==9){event.preventDefault();document.getElementById('form1:country').focus();}"

                                style="margin-left:61px;" maxlength="4">


                            <br />

                            <h:outputText value="Country"></h:outputText>

                            <h:inputText id="country" value="#{addVendor.country}" tabindex="2"

                                style="margin-left:61px;text-transform:uppercase;" maxlength="5"></h:inputText>

                            <h:outputText value="      "></h:outputText>


                            <a4j:commandButton action="#{addVendor.getSKUCount}" execute="@form"

                                render="actSKU inactSKU" styleClass="buttonClass"

                                style="width:88px;margin-left:50px;" value="Get SKU Count">



                            <a4j:commandButton value="Add" execute="@form"

                                render="tbl_viewvnd cmdBtn envTable" styleClass="buttonClass"

                                style="width:52px;margin-left:70px;" action="#{addVendor.add}">

                                <a4j:param name="envName" value="#{viewVendor.envNameLabel}"></a4j:param>

                                <a4j:param name="curractvSKUCnt"


                                <a4j:param name="currinactvSKUCnt"


                                <a4j:param name="skuLimit" value="#{viewVendor.skuLimit}"></a4j:param>



                            <br />


                            <h:outputLabel style="margin-right:13px;" value="Active SKU Count"></h:outputLabel>

                            <h:outputText id="actSKU" value="#{addVendor.indactSKUCnt}">

                                <f:convertNumber minFractionDigits="0"></f:convertNumber>



                            <br /> <br />

                            <h:outputLabel style="margin-right:7px;" value="Inactive SKU Count"></h:outputLabel>

                            <h:outputText id="inactSKU" value="#{addVendor.indinSKUCnt}">

                                <f:convertNumber minFractionDigits="0"></f:convertNumber>



                            <br />








                        <div id="footer">

                            <ui:insert name="footer">

                                Copyright of Stores Inc.,

                            <h:outputText value="#{now}">

                                    <f:convertDateTime pattern="yyyy" type="date"></f:convertDateTime>


                        . All Rights Reserved.









            • 3. Re: Chrome 44 version tabindex is not working.
              Michal Petrov Master

              So pressing tab on anything focuses the URL bar? That doesn't look like a problem of the app, I don't think it's possible to focus the url bar with JavaScript.


              As for the code, the error hardly concerns the entire page, reduce it to the few lines of code that cause the issue. (http://sscce.org) Though I'm not sure the problem is in the code.

              • 4. Re: Chrome 44 version tabindex is not working.
                Gopal Herkal Newbie

                I have three words for you Michal - "You are awesome!". Thanks!!!!!!!!!!!!! Keydown worked for me .. Yippieeeeeee!!!!!