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

Library tab unable to close after unsave action #8768

Closed
2 tasks done
LIM0000 opened this issue May 9, 2022 · 7 comments
Closed
2 tasks done

Library tab unable to close after unsave action #8768

LIM0000 opened this issue May 9, 2022 · 7 comments
Labels
component: ui [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs status: depends-on-external A bug or issue that depends on an update of an external library

Comments

@LIM0000
Copy link
Contributor

LIM0000 commented May 9, 2022

JabRef version

5.6 (latest release)

Operating system

Windows

Details on version and operating system

No response

Checked with the latest development build

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Click on "New library" button.
  2. Click on "+" button to add new article.
  3. Click on "X" beside tab to close tab.
  4. Click on "Return to JabRef" or "X" button to close Save before closing dialog.
  5. Click on "X" beside tab again to close tab.
  6. User unable to select or close the tab.
bug_1.1.mp4

Appendix

...

Log File
Paste an excerpt of your log file here
@LIM0000
Copy link
Contributor Author

LIM0000 commented May 9, 2022

Mentioned in PR #8297 when I am working on #8296 and #8096.
Failed to fix this issue but found the root of this issue.

Issue happens here:

event.consume() only able to trigger once if dialogService is executed in closeTab()

libraryTab.setOnCloseRequest(event -> {
            closeTab(libraryTab);
            libraryTab.getDataLoadingTask().cancel();
            event.consume();
        });
Optional<ButtonType> response = dialogService.showCustomButtonDialogAndWait(Alert.AlertType.CONFIRMATION,
                Localization.lang("Save before closing"),
                Localization.lang("Library '%0' has changed.", filename),
                saveChanges, discardChanges, cancel);

More testing:

I have found that showAndWait() is causing event.consume() to only run once.

bug_1 1

@ThiloteE ThiloteE added [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs component: export-or-save labels May 9, 2022
@ThiloteE
Copy link
Member

ThiloteE commented May 9, 2022

To clarify: This issue was mentioned in pr #8297, but this can also be reproduced in current JabRef stable 5.6.

@HoussemNasri
Copy link
Member

HoussemNasri commented May 9, 2022

It appears to be a known JavaFX issue involving Alert dialogs; it was reported in OpenJFX 11 and fixed targeted to OpenJFX 19 - Alert disables Tab selection when TabDragPolicy REORDER is used

Note

  • I changed the drag policy in TabPane to TabPane.TabDragPolicy.FIXED and the issue is gone.
  • I updated JavaFX version to 19-ea+6 but the problem persists.
  • I tried this workaround but it doesn't work.

@Siedlerchr Siedlerchr added the status: depends-on-external A bug or issue that depends on an update of an external library label May 9, 2022
@Siedlerchr
Copy link
Member

@HoussemNasri Thanks for the hint, it is targeted for javafx19, but there is not, yet, any PR linked to it :( So we have to wait until it gets fixed

@HoussemNasri
Copy link
Member

HoussemNasri commented May 9, 2022

it is targeted for javafx19, but there is not, yet, any PR linked to it

Thank you for the clarification, this explains why updating to version 19-ea+6 didn't fix it.

@HoussemNasri
Copy link
Member

HoussemNasri commented Sep 14, 2022

The bug still present in JavaFX 19 release version. It is targeted to be fixed in version 20. A pull request has already been submitted to address it: openjdk/jfx#895

@koppor koppor moved this to Normal priority in Prioritization Nov 10, 2022
@Siedlerchr
Copy link
Member

Thank you for reporting this issue. We think, that is already fixed in our development version and consequently the change will be included in the next release.

We would like to ask you to use a development build from https://builds.jabref.org/main and report back if it works for you. Please remember to make a backup of your library before trying-out this version.

@github-project-automation github-project-automation bot moved this from Normal priority to Done in Prioritization Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ui [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs status: depends-on-external A bug or issue that depends on an update of an external library
Projects
Archived in project
Development

No branches or pull requests

4 participants