Description of the bug
A simple application with project base starter, code as below. When clicking on the button, 2 requests are sent.
Minimal reproducible example
@Route("")
public class MainView extends VerticalLayout {
public MainView() {
Button button = new Button("Click me",
event -> Notification.show("Clicked!"));
add(button);
}
}
Expected behavior
1 request would be enough. Seems like the second request confirms to the server that the notification is actually opened. That's quite redundant since the server just asked it to open itself.
I'd consider it as a bug that it needs to send that request since the server should only know what goes on in this case.
Minimal reproducible example
{csrfToken: "66b35c8e-fd13-4d2b-ac09-6791a73f5ac3", rpc: [{type: "event", node: 4, event: "click",…}],…}
1st responsefor(;;);[{"syncId":4,"clientId":4,"changes":[{"node":1,"type":"splice","feat":2,"index":1,"addNodes":[11]},{"node":9,"type":"attach"},{"node":9,"type":"put","key":"payload","feat":0,"value":{"type":"inMemory"}},{"node":9,"type":"put","key":"tag","feat":0,"value":"div"},{"node":10,"type":"attach"},{"node":10,"type":"put","key":"tag","feat":0,"value":"template"},{"node":10,"type":"put","key":"innerHTML","feat":1,"value":"Clicked!"},{"node":11,"type":"attach"},{"node":11,"type":"put","key":"tag","feat":0,"value":"vaadin-notification"},{"node":11,"type":"splice","feat":2,"index":0,"addNodes":[10]},{"node":11,"type":"put","key":"duration","feat":1,"value":5000},{"node":11,"type":"put","key":"opened","feat":1,"value":true},{"node":11,"type":"put","key":"position","feat":1,"value":"bottom-start"},{"node":11,"type":"put","key":"opened-changed","feat":4,"value":"vIpODLLAUDo="},{"node":11,"type":"splice","feat":13,"index":0,"add":["opened"]},{"node":11,"type":"splice","feat":14,"index":0,"add":["opened-changed"]},{"node":11,"type":"splice","feat":24,"index":0,"addNodes":[9]}],"timings":[97,0]}]
2nd request payload{csrfToken: "66b35c8e-fd13-4d2b-ac09-6791a73f5ac3",…} clientId: 4 csrfToken: "66b35c8e-fd13-4d2b-ac09-6791a73f5ac3" rpc: [{type: "event", node: 11, event: "opened-changed"}] 0: {type: "event", node: 11, event: "opened-changed"} event: "opened-changed" node: 11 type: "event" syncId: 4