scenebuilder icon indicating copy to clipboard operation
scenebuilder copied to clipboard

fix: Added workaround for JDK-8205915. Will fix issues #221, #263 and #306.

Open Oliver-Loeffler opened this issue 2 years ago • 0 comments

To avoid the issue filed in JDK-8205915, for MacOS the call to TextInputControl.paste() method is replaced with a class com.oracle.javafx.scenebuilder.app.util.TextInputControlPaster. This utility class prevents the controls paste method if desired and directly writes the Clipboard contents into the correct position of the TextInputControl.

This does not fix the root cause for JDK-8205915 but ensures that the paste functionaliy can be used in Scene Builder on MacOS. Once JDK-8205915 is solved, this workaround shall be removed.

Issue

When pasting clipboard contents into TextInputControl elements, then the clipboard contents is always pasted twice on MacOS. There is a bug ticket for JavaFX in JBS, which is JDK-8205915.

As this behavior is very annoying on MacOS, this PR might provide a temporary workaround until JDK-8205915 is fixed.

Fixes #221 Fixes #263 Fixes #306

Progress

Oliver-Loeffler avatar Jan 05 '22 16:01 Oliver-Loeffler