Anna Koskinen [Tue, 16 Mar 2021 07:45:15 +0000 (09:45 +0200)]
Test fixes and tweaks (#12239)
- Properly init client-side data in GridDataChangeHandlerTest
- Update Chrome version
- Separate and refactor ComboboxMenuBarAutoopenTest test cases to match
test description
- Update screenshot for ResponsiveStylesTest
- Refactor TextAreaEventPropagationTest to better match expected
behavior
- Add delay to GridDetailsClientTest and EscalatorSpacerTest for
stability
- Add delay and retries to TreeItemDoubleClickTest for stability
Co-authored-by: Teemu Suo-Anttila <teemusa@vaadin.com>
Anna Koskinen [Mon, 15 Feb 2021 07:03:00 +0000 (09:03 +0200)]
Clear out ClientCache when UI is detached to prevent a minor memory leak (#12200)
Implemented with a listener rather than direct call from UI.detach() in
order to avoid new public API, since the whole feature has been marked
for removal. This doesn't yet prevent the cache or the type map from
getting slightly bloated during the UI's lifetime.
Tatu Lund [Wed, 3 Feb 2021 14:52:08 +0000 (16:52 +0200)]
fix: use time-constant comparison for security tokens (#12192)
This is the same as #12190, but also applied for the upload security key
and the push id since both of those are also used to protect against
cross-site attacks. In addition, documentation for the push id is
clarified to point out its role.
Anna Koskinen [Fri, 2 Oct 2020 13:23:31 +0000 (16:23 +0300)]
Test fixes (#12108)
- Updated Chrome version
- Added leeway to ComboBox popup following along while scrolling
- Added workarounds to timing issues that aren't relevant for the tests
- Added delays for stability
Tatu Lund [Fri, 4 Sep 2020 10:35:13 +0000 (13:35 +0300)]
Fix IndexOutOfBoundsException when adding columns in Grid (#12095)
There is regression in Vaadin 7.7.16 and later, which is due patch https://github.com/vaadin/framework/commit/eafd44672650e076fc4a43362e11b47ffb0dbff1 that can lead to IndexOutOfBoundsException when there is hidden columns while adding new columns, which is similiar issue than earlier reported in https://github.com/vaadin/framework/issues/6784. Essentially the performance improvement patch overwrite some of the fix logic of https://github.com/vaadin/framework/commit/84533057435a99b0d0dfa9ea791de81921c1e260 This fix bring overwriten escalator index compensation back.
Tatu Lund [Wed, 17 Jun 2020 08:11:07 +0000 (11:11 +0300)]
Fixing issue with Vaadin 7 combobox when typing and tabing out fast (#12033)
ComboBox does not select or add a new value (in case allowed) if User enters the value by typing and TABs out fast. This bug was originally reported in https://github.com/vaadin/framework/issues/4276 and fixed by https://dev.vaadin.com/review/#/c/3564/6/client/src/com/vaadin/client/ui/VFilterSelect.java. However later some logic of VFilterSelect was refactored by patch https://github.com/vaadin/framework/commit/acb889336f80227d609b194e56ac6ae3ead0d338, which accidentally removed the fix. In this new PR I am re-applying the missing part of the logic (adopted to the new structure)
Tatu Lund [Mon, 11 May 2020 06:45:42 +0000 (09:45 +0300)]
Determine Push transport before re-connect (#11988)
onConnect was allways called with websocket = false. I think this is wrong, since if there was connection loss in websocket, now connection cannot be re-established in websocket mode.
Fixes: https://github.com/vaadin/framework/issues/7190
Cherry pick of https://github.com/vaadin/framework/pull/11884
Tatu Lund [Wed, 13 Nov 2019 16:39:36 +0000 (18:39 +0200)]
Use APPLICATION_SCOPE for the session lock (#11804)
* Use APPLICATION_SCOPE for the session lock
To be able to do this, relevant methods in VaadinService are made protected so
that VaadinPortletService can override them.
The Vaadin session itself is also stored in APPLICATION_SCOPE. The default
scope is PORTLET_SCOPE, so lock would otherwise not be in sync with
the session.
When multi-select has been enabled and disabled a number of times, sorting on the first column in a Grid is broken.
Unregistering a click handler on the header solves the problem.
* Added a test checking that sorting of a grid column still works after having enabled and then disabled multi select mode.
The grid is configured with an extra header row containing a text box since it triggers an exception if the header click handler for the multi select column is not removed.
* Remove an unused import that was added by mistake
Tatu Lund [Mon, 11 Mar 2019 07:55:05 +0000 (09:55 +0200)]
Catch exception that is thrown when Grid is scrolled during operation (#11467)
IllegalStateException may occur if user has scrolled Grid so that Escalator has updated, and row under Editor is no longer there
Fixes https://github.com/vaadin/framework/issues/11463
Backport to V7:
During `updateFromUIDL` inside MenuBarConnector we empty and re-instantiate the components of MenuBar. When we are modifying the Menubar from the BlurEventListener of another component, we ,by this, remove widgets, therefore clickEvent is not fired and the action of the MenuItem is not proceed as a result. (The BlurEvent is fired before the click event in the chain of events. )
To improve the situation, we catch onMouseDown event , which is fired before BlurEvent,by assigning mouseDown flag to true. Then if no click event has yet happened, we delay the execution of update inside `updateFromUIDL` by default 500 ms. Then if click event occurs, it proceeds normally. The time can be increased/decreased using setter.
There is no delay, if we are clicking on the MenuBar as usual or no Blur listener is set.
This change allows setting descriptions preserving the action from the MenuItem
When finished with upload, streamVariable should be disposed.
Now StreamVariable is removed also from streamVariableToSeckey.
https://github.com/vaadin/framework/issues/10695 #10695