Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion articles/flow/browser-apis/clipboard-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

== Other Click Sources

[methodname]`Clipboard.onClick()` accepts any component implementing [interfacename]`ClickNotifier`, not just [classname]`Button`. A [classname]`ContextMenu` item is a common alternative -- the user right-clicks a target and picks "Copy" from the menu:
[methodname]`Clipboard.onClick()` accepts any component, not just [classname]`Button`. A [classname]`ContextMenu` item is a common alternative -- the user right-clicks a target and picks "Copy" from the menu:

Check warning on line 73 in articles/flow/browser-apis/clipboard-api.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.JustSimply] Avoid using 'just'. It may be insensitive. Raw Output: {"message":"[Vaadin.JustSimply] Avoid using 'just'. It may be insensitive.","location":{"path":"articles/flow/browser-apis/clipboard-api.adoc","range":{"start":{"line":73,"column":62},"end":{"line":73,"column":66}}},"severity":"WARNING","code":{"value":"Vaadin.JustSimply","url":"https://css-tricks.com/words-avoid-educational-writing/"}}

[source,java]
----
Expand Down
2 changes: 1 addition & 1 deletion articles/flow/browser-apis/web-share-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ WebShare.onClick(shareButton).share(
ShareContent.create().title("Vaadin").url("https://vaadin.com"));
----

The trigger component must implement [interfacename]`ClickNotifier`, which covers buttons and most other clickable components.
The trigger can be any component whose root element receives the click -- not only components that implement [interfacename]`ClickNotifier`, but also, for example, menu items.

[IMPORTANT]
[methodname]`onClick(...)` _arms_ the share action; it does not register a click listener you fill in later. The share sheet must open inside the browser's gesture window, so the action has to be armed up front -- calling [methodname]`share()` from an [methodname]`addClickListener` callback runs one round-trip too late and the browser rejects it. Forgetting [methodname]`share()` altogether -- a binding created with no action -- fails loudly instead: the framework throws an [classname]`IllegalStateException` when the view renders. See <<{articles}/flow/browser-apis/clipboard-api#how-the-binding-works,How the Click Binding Works>> in the Clipboard article for the full explanation of this arm-don't-handle model.
Expand Down
Loading