Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't mark date fields as visited until user is done we datepicker #2489

Closed
avernet opened this issue Jan 12, 2016 · 3 comments
Closed

Don't mark date fields as visited until user is done we datepicker #2489

avernet opened this issue Jan 12, 2016 · 3 comments

Comments

@avernet
Copy link
Collaborator

avernet commented Jan 12, 2016

Currently:

  • If a date field is marked as required,
  • then, when the user clicks on the input field,
  • then in the datepicker she clicks on the arrow to navigate to the next month,
  • then the alert for the field shows while she isn't done yet selecting a value.

Instead, we wouldn't want the alert to show until the datepicker has been closed.

@avernet avernet self-assigned this Jan 12, 2016
@avernet avernet added this to the 4.11 milestone Jan 12, 2016
@avernet
Copy link
Collaborator Author

avernet commented Jan 14, 2016

+1 from customer

avernet added a commit that referenced this issue Jan 14, 2016
@avernet
Copy link
Collaborator Author

avernet commented Jan 28, 2016

Reopening, as this problem show up with minimal resources (but "combine" can be left to "false" to reproduce the problem), even it is is indeed fixed when not using minimal resources.

@avernet avernet reopened this Jan 28, 2016
@avernet
Copy link
Collaborator Author

avernet commented Jan 28, 2016

With minimal resources, when switching month, the clients sends a xxforms-blur and xforms-focus event to the server.

To debug this, we want to make changes to xforms.js and we can have the minimal version regenerated with: java -jar lib/yuicompressor-2.4.7.jar src/resources-packaged/ops/javascript/xforms.js -o build/orbeon-war/WEB-INF/resources/ops/javascript/xforms-min.js.

On Chrome, there are 2 blur events: one when the input loses focus, and one when the "next month" anchor loses the focus because the HTML for that part of the calendar is regenerated. The problem is with this second blur. In c9c8332, we modified YUI's calendar.js to stop the propagation of focusout in render(), when we regenerate the HTML. But that change didn't make it to calendar-min.js as that file wasn't minimized by build.xml. Doing so solves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant