-
Bug
-
Resolution: Unresolved
-
P4
-
jfx23
-
None
To reproduce, launch the attached code sample. Select the "txt" option via the combo box and presses the [Save] button, a FileChooser dialog is opened with setInitialFileName() and setInitialDirectory(). Additionally, the extension filters are set with a list in which the first filter corresponds to the selected type.
Observe the "Save As:" input field in the file chooser.
With the "txt" extension, "File" portion of the file name is selected, ".txt" portion is unselected (see the screenshot).
With the "rich" extension, on the other hand, the filename displayed becomes "File.rich.rich" with the "File.rich" portion selected, and the last ".rich" portion unselected (see the screenshot).
The logic which handles the extension is correct in the "txt" case and is incorrect in the "rich" case.
In addition to fixing the bug, we should probably clarify setInitialName() javadoc.
Observe the "Save As:" input field in the file chooser.
With the "txt" extension, "File" portion of the file name is selected, ".txt" portion is unselected (see the screenshot).
With the "rich" extension, on the other hand, the filename displayed becomes "File.rich.rich" with the "File.rich" portion selected, and the last ".rich" portion unselected (see the screenshot).
The logic which handles the extension is correct in the "txt" case and is incorrect in the "rich" case.
In addition to fixing the bug, we should probably clarify setInitialName() javadoc.
- relates to
-
JDK-8352268 RichEditorDemo: Save file doesn't always save
-
- Resolved
-