vaadin / vaadin/framework

Scroll jumps back if using TAB-key from next text field without entering any text

Open
#7,103 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Stale v7
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

Originally by @TatuLund


TAB key navigation will cause incorrect scroll behavior in case of using TextFields binded with BeanFieldGroup on a scrollable panel. Note in this case fields are set "setImmediate(true)" Therefore "changeVariables(Object source, Map<String, Object> variables)" is always called and fields are submitted to server when TAB key is pressed.

The use case problem is that if user doesn't notice that panel scrolled back to wrong place, he/she can input value to wrong field.

Happens with FireFox and Internet Explorer. This issue doesn't happen with Chrome.

See attached example project for demonstration of the issue.


Imported from https://dev.vaadin.com/ issue #18783

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached example project and reproduce TAB navigation using TextFields bound with BeanFieldGroup inside a scrollable panel, with setImmediate(true), in Firefox and Internet Explorer. Trace changeVariables(Object source, Map<String, Object> variables) during submission and compare Chrome behavior. Done means TAB from an empty field no longer jumps the scroll position to the wrong place.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.