[jira] [Commented] (WW-4718) focusElement form attribute not working
[ https://issues.apache.org/jira/browse/WW-4718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15692494#comment-15692494 ] Lukasz Lenart commented on WW-4718: --- If you are using the Bootstrap plugin you can simple override its {{form-close.ftl}} template by create a file {{template/bootstrap/form-close.ftl}} {code:xml} <#include "/${parameters.templateDir}/bootstrap/control-close.ftl" /> <#include "/${parameters.templateDir}/simple/form-close.ftl" /> if (typeof jQuery != 'undefined') { if (typeof jQuery.fn.tooltip == 'function') { jQuery('i.s2b_tooltip').tooltip(); } } <#if parameters.focusElement??> if (typeof jQuery != 'undefined') { jQuery(document).ready(function() { var element = jQuery("#${parameters.focusElement?html}"); console.log(element); if(element) { element.focus(); } }); } {code} > focusElement form attribute not working > --- > > Key: WW-4718 > URL: https://issues.apache.org/jira/browse/WW-4718 > Project: Struts 2 > Issue Type: Bug >Affects Versions: 2.3.24, 2.5.5 > Environment: internet explorer > chrome >Reporter: Chad Davis > Fix For: 2.5.6 > > > I cannot get the focusElement attribute on the form tag to work. I've tried > it in both IE and chrome and in neither case will the text field I want to > focus when the page loads do so. > Here is the html for the form I'm trying to do this with: > {code:xml} > focusElement="subscriberListAutocomplete"> > > id="subscriberListAutocomplete" > cssClass="subscriberListAutocomplete form-control" > placeholder="Subscriber Name" > tabindex="1"/> > >cssClass="btn btn-success" > tabindex="0"/> > > > > {code} > If I change the textfield to a basic input element and use html's autofocus > attribute, it works fine. I have no idea what else I can try on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (WW-4718) focusElement form attribute not working
[ https://issues.apache.org/jira/browse/WW-4718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15689192#comment-15689192 ] Lukasz Lenart commented on WW-4718: --- {{}}? > focusElement form attribute not working > --- > > Key: WW-4718 > URL: https://issues.apache.org/jira/browse/WW-4718 > Project: Struts 2 > Issue Type: Bug >Affects Versions: 2.3.24, 2.5.5 > Environment: internet explorer > chrome >Reporter: Chad Davis > Fix For: 2.5.6 > > > I cannot get the focusElement attribute on the form tag to work. I've tried > it in both IE and chrome and in neither case will the text field I want to > focus when the page loads do so. > Here is the html for the form I'm trying to do this with: > {code:xml} > focusElement="subscriberListAutocomplete"> > > id="subscriberListAutocomplete" > cssClass="subscriberListAutocomplete form-control" > placeholder="Subscriber Name" > tabindex="1"/> > >cssClass="btn btn-success" > tabindex="0"/> > > > > {code} > If I change the textfield to a basic input element and use html's autofocus > attribute, it works fine. I have no idea what else I can try on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (WW-4718) focusElement form attribute not working
[ https://issues.apache.org/jira/browse/WW-4718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15689183#comment-15689183 ] Lukasz Lenart commented on WW-4718: --- Do you use {{xhtml}} theme? Did you include Struts JS helper? > focusElement form attribute not working > --- > > Key: WW-4718 > URL: https://issues.apache.org/jira/browse/WW-4718 > Project: Struts 2 > Issue Type: Bug >Affects Versions: 2.3.24, 2.5.5 > Environment: internet explorer > chrome >Reporter: Chad Davis > Fix For: 2.5.6 > > > I cannot get the focusElement attribute on the form tag to work. I've tried > it in both IE and chrome and in neither case will the text field I want to > focus when the page loads do so. > Here is the html for the form I'm trying to do this with: > {code:xml} > focusElement="subscriberListAutocomplete"> > > id="subscriberListAutocomplete" > cssClass="subscriberListAutocomplete form-control" > placeholder="Subscriber Name" > tabindex="1"/> > >cssClass="btn btn-success" > tabindex="0"/> > > > > {code} > If I change the textfield to a basic input element and use html's autofocus > attribute, it works fine. I have no idea what else I can try on this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)