[ 
https://issues.apache.org/jira/browse/FLAGON-434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16904100#comment-16904100
 ] 

Joshua Poore commented on FLAGON-434:
-------------------------------------

I have been investigating this behavior to confirm it is as expected:

We get input and change events by default. data-log-details = true in HTML5 
parameters will git input values and change values:

Input events fire for everything in the input HTML element class (e.g., input, 
radio), as well as select class, etc.

change events fire anytime input events fire, specifically when the classes 
above are modified from default values. not informative beyond input events, 
except in the case of user modifications to autocomplete, perhaps. However, I 
have not explored this behavior in an environment with autocomplete for forms.

Submit events are super tricky, turns out. The submit event is its own class 
even though its a special case of input element class. When a user clicks 
submit or hits `enter', two things happen:
 # A click event is emitted on the submit element (whether button or image); 
this happens regardless of whether submission happens via click or enter.
 # A submit event is emitted on the FORM (not the submit button or img 
element). This, in turn, refreshes the page and form. 

I have confirmed that userale picks up these 2 behaviors by modifying src to 
emit 'alerts' indicating the behavior (which prevents the page from reloading 
until alert has been resolved). However, they don't actually make it through to 
the logging end-point. The challenge this poses for useralej.js 2.0.2 is that 
when the page refreshes, so does userale.js, which means that the log queue is 
erased, and sendLogs isn't called as this behavior is out of the scope for 
sendOnInterval and sendOnClose. Refreshes aren't detectable as they are 
happening, only after the fact. This is a browser security feature.

So, in order to fully capture form data, including Submit events (though we 
won't ever get what is submitted), package sent to the server (I don't think we 
want that), we need a new function to initiate sendLogs before the refresh 
takes place.

Adding sub-tasks

> capture what is submitted via forms
> -----------------------------------
>
>                 Key: FLAGON-434
>                 URL: https://issues.apache.org/jira/browse/FLAGON-434
>             Project: Flagon
>          Issue Type: Improvement
>          Components: UserALE.js
>    Affects Versions: UserALE.js 2.1.0
>            Reporter: Joshua Poore
>            Assignee: Joshua Poore
>            Priority: Major
>             Fix For: UserALE.js 2.1.0
>
>
> We have a submit event handler, but we may not get what is submitted. 
> Get inner html on [https://www.w3schools.com/html/html_forms.asp] "text";



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to