|
@@ -205,6 +205,18 @@ export default class AlwaysOnTop extends Component<*, State> {
|
205
|
205
|
this._hideToolbarAfterTimeout();
|
206
|
206
|
}
|
207
|
207
|
|
|
208
|
+ /**
|
|
209
|
+ * Sets a timeout to hide the toolbar when the toolbar is shown.
|
|
210
|
+ *
|
|
211
|
+ * @inheritdoc
|
|
212
|
+ * @returns {void}
|
|
213
|
+ */
|
|
214
|
+ componentDidUpdate(prevProps: *, prevState: State) {
|
|
215
|
+ if (!prevState.visible && this.state.visible) {
|
|
216
|
+ this._hideToolbarAfterTimeout();
|
|
217
|
+ }
|
|
218
|
+ }
|
|
219
|
+
|
208
|
220
|
/**
|
209
|
221
|
* Removes all listeners.
|
210
|
222
|
*
|
|
@@ -223,18 +235,6 @@ export default class AlwaysOnTop extends Component<*, State> {
|
223
|
235
|
window.removeEventListener('mousemove', this._mouseMove);
|
224
|
236
|
}
|
225
|
237
|
|
226
|
|
- /**
|
227
|
|
- * Sets a timeout to hide the toolbar when the toolbar is shown.
|
228
|
|
- *
|
229
|
|
- * @inheritdoc
|
230
|
|
- * @returns {void}
|
231
|
|
- */
|
232
|
|
- componentWillUpdate(nextProps: *, nextState: State) {
|
233
|
|
- if (!this.state.visible && nextState.visible) {
|
234
|
|
- this._hideToolbarAfterTimeout();
|
235
|
|
- }
|
236
|
|
- }
|
237
|
|
-
|
238
|
238
|
/**
|
239
|
239
|
* Implements React's {@link Component#render()}.
|
240
|
240
|
*
|