Comments (7)
I say go for the refactor! 😊 It seems like a fairly focused change to make that will provide benefits in the future.
Edit: and yes, keeping focus on the last used component sounds right.
from briefcase.
Okay, I´ll work on it sometime this week.
from briefcase.
This behavior also happens after an export.
from briefcase.
This problem seems to be caused by the FocusTraversalPolicy on the MainBriefcaseWindow. In both getComponentBefore and getComponentAfter (line 284 - 357)
tabbedPane.setSelectedIndex(nextPanel);
is called, to switch to the next tab, if no component is found, satisfying the following conditions.
if ( comp == tabbedPane ) {
return comp;
}
if ( comp.isVisible() && comp.isEnabled() && (!(comp instanceof JTextField) ||
((JTextField) comp).isEditable()) ) {
return comp;
}
If the cancel button, wich is the component after the pull button is disabled, the conditions will evaluate to false, causing the tab jump.
Instead of jumping to the next tab if no component is found, keeping the focus on the last used component could be a good solution.
In terms of class design, refactoring the tabs to implement their own policies might even be better.
@yanokwa @lognaturel What do you guys think?
from briefcase.
@carstendev I'll leave this issue closed since the surface problem is fixed. We'd love some refactoring if you're still up for it! 😊
from briefcase.
@lognaturel Refactoring is still a good idea, I´ll try to work on it, as soon as I´m not so swamped with work.
from briefcase.
Of course, whenever you have time. Thanks, @carstendev!
from briefcase.
Related Issues (20)
- Crash on export when submission is empty HOT 1
- Crash on reloading from Central server not right after configuring it HOT 1
- Crash on attempted cancel of pull from Central server when offline
- Socket closed when pushing 3k+ submissions to Central HOT 3
- Forms with external secondary instances aren't shown on export or push tabs HOT 1
- Crash when pulling forms with spaces in formId from Central
- Pull before export doesn't work for forms from Central
- Pull from Collect directory where a few versions of the same form are available is not possible HOT 1
- On pull from Central, submission attachments are not requested if submission folder exists
- Forms aren’t immediately showing up in push or export after a canceled pull - only with Java 8
- Export is crashing after canceling pull when empty submissions are created - Java 8
- Make documentation link in Central push warning dialog clickable
- Support empty form versions when doing multi-version push to Central
- Form selection is lost and status is missing on Export tab when pull before export process in progress
- Briefcase tabs are disabled when run on java 9 and 10 and select sd on Windows
- Pull/Push/Export tabs are still active when the storage location is cleared HOT 3
- On export, skip encrypted submissions with manifest but no .enc file and mark as failed
- Form selection and individual export configuration in export tab becomes disabled
- Export using CLI ok, but freezes / hangs using GUI (Key too long?)
- Export of encrypted submissions using Briefcase UI fails HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from briefcase.