Unverified Commit 045b8ad3 authored by Igor Demin's avatar Igor Demin Committed by GitHub

Fix clipboard (#586)

We need to also catch IllegalStateException. It is said in the JavaDoc and mentioned here:

https://github.com/JetBrains/compose-jb/issues/2098#issuecomment-1234693644
parent 5a24df69
...@@ -61,6 +61,8 @@ internal actual fun ClipboardManager_getText(): String? { ...@@ -61,6 +61,8 @@ internal actual fun ClipboardManager_getText(): String? {
systemClipboard?.getData(DataFlavor.stringFlavor) as String? systemClipboard?.getData(DataFlavor.stringFlavor) as String?
} catch (_: UnsupportedFlavorException) { } catch (_: UnsupportedFlavorException) {
null null
} catch (_: IllegalStateException) {
null
} catch (_: IOException) { } catch (_: IOException) {
null null
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment