[seam-issues] [JBoss JIRA] (JBSEAM-4648) s:defaultAction blocks new lines in <textArea>

Nicholas Oxhøj (JIRA) jira-events at lists.jboss.org
Fri Feb 10 05:23:50 EST 2012


    [ https://issues.jboss.org/browse/JBSEAM-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665582#comment-12665582 ] 

Nicholas Oxhøj commented on JBSEAM-4648:
----------------------------------------

Hmm, I just found a problem with the proposed solutions (including my own).

The problem is that we want the user to actually be able to press "Enter" to create a new line in a textarea. But to implement keyboard navigation in custom components, at least OpenFaces often place the focus in a "hidden" (not using "display:none" or "visibility:hidden", but just placed outside the visible window) textarea to listen to keyboard events. And, as you probably guessed by now, the defaultAction does not work if the focus is currently placed in e.g. an OpenFaces DataTable or an OpenFaces TreeTable :-(

Unfortunately I currently don't have any good suggestions on how to work around this issue. I am not very keen on starting to check for e.g. OpenFaces specific classes (like "o_hiddenFocus") in the code for defaultAction...
                
> s:defaultAction blocks new lines in <textArea>
> ----------------------------------------------
>
>                 Key: JBSEAM-4648
>                 URL: https://issues.jboss.org/browse/JBSEAM-4648
>             Project: Seam 2
>          Issue Type: Bug
>          Components: JSF Controls
>    Affects Versions: 2.2.1.CR1
>            Reporter: Adrian Mitev
>
> s:defaultAction shouldn't work if the enter button is presses inside textarea element. To fix the issue wrap the javascript that s:defaultAction generates inside this code:
> var evt = event.IE ? event.srcElement : event.target; if (evt.tagName.toLowerCase() != 'textarea') { <original javascript here> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the seam-issues mailing list