DataTable: Onfocus event fired three times with cellEdit/rowEdit
See original GitHub issueDescribe the defect onfocus fired three times on inputtext with cellEdit DataTable
Environment:
- PF Version: 8.0
- JSF + version: 2.2.12-jbossorg-2
- Affected browsers: ALL
To Reproduce Steps to reproduce the behavior: 2. Click on cell Year 3. Show browser console 4. See same log three times for focus
Example XHTML
<p:column headerText="Year">
<p:cellEditor>
<f:facet name="output"><h:outputText value="#{car.year}" /></f:facet>
<f:facet name="input"><p:inputText value="#{car.year}" style="width:96%" label="Year" onfocus="console.log('focus row'+#{index})"/></f:facet>
</p:cellEditor>
</p:column>
Issue Analytics
- State:
- Created 3 years ago
- Comments:21 (13 by maintainers)
Top Results From Across the Web
focus event is firing multiple times - javascript - Stack Overflow
Basically, your event is added several times. A simple way to fix this is to set the event via the property of the...
Read more >Button click fired multiple times when performing filtering
Hello, I've a datatable with 2 button as first row. The data are retrieved via ajax and there're footer input to filter on...
Read more >Element: focus event - Web APIs | MDN
The focus event fires when an element has received focus. The event does not bubble, but the related focusin event that follows does...
Read more >onfocus Event - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi there, office is closed for summer holidays. I’ll test it as soon as I can and give feedback.
Thank you to get on it, Mirco
I can see 3 focus events are registered to the input thus that is why 3 are being called.
Trying to figure out how to handle this.