@electerm/electerm-react 5.5.6 → 5.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -170,18 +170,31 @@
170
170
  .upgrade-panel
171
171
  max-width calc(100vw - 20px)
172
172
 
173
- // ---- 9. Terminal touch support: prevent the browser's native long-press
174
- // callout (iOS "Copy/Look Up" menu) and text-selection gesture from
175
- // interfering with xterm's own touch handling and our custom
176
- // long-press context-menu detection. xterm.js already sets
177
- // user-select:none on .xterm; we additionally suppress the iOS
178
- // callout and set touch-action so the browser does not compete with
179
- // xterm for touch gesture interpretation.
173
+ // ---------------------------------------------------------------------------
174
+ // Terminal touch selection (behaviour in mixins/term-touch.js).
175
+ //
176
+ // Scoped to is-touch-device on top of the narrow-window is-mobile case: a
177
+ // tablet held in landscape is wider than the 600px mobile breakpoint but is
178
+ // still touch-primary and needs the same suppression, while store.isTouchDevice
179
+ // keeps it off for anything mouse-driven (it follows the input in use — see
180
+ // main.jsx).
181
+ //
182
+ // - the browser's native long-press callout (iOS "Copy/Look Up" menu) and its
183
+ // own text-selection gesture would fight xterm for the touch stream and
184
+ // swallow the long press that starts a selection;
185
+ // - xterm already sets user-select:none on .xterm; touch-action:none stops the
186
+ // browser scrolling/zooming the page out from under a selection drag, since
187
+ // xterm does its own scrolling from gesture events.
188
+ // ---------------------------------------------------------------------------
189
+ .is-mobile,
190
+ .is-touch-device
180
191
  .term-wrap
181
192
  -webkit-touch-callout none
182
193
  -webkit-tap-highlight-color transparent
183
194
  .xterm
184
195
  -webkit-touch-callout none
196
+ -webkit-user-select none
197
+ user-select none
185
198
  touch-action none
186
199
 
187
200
  // ---------------------------------------------------------------------------
@@ -17,10 +17,10 @@ import generate from '../common/id-with-stamp'
17
17
  import uid from '../common/uid'
18
18
  import newTerm, { updateCount } from '../common/new-terminal.js'
19
19
  import { action } from 'manate'
20
- import { shouldCaptureSshReloadState } from '../components/terminal/ssh-reload-state.js'
20
+ import { shouldCaptureTerminalReloadState } from '../components/terminal/ssh-reload-state.js'
21
21
 
22
22
  function captureSshSessionState (tab, config) {
23
- return shouldCaptureSshReloadState(tab, config)
23
+ return shouldCaptureTerminalReloadState(tab, config)
24
24
  ? refs.get(`term-${tab.id}`)?.getReloadState?.()
25
25
  : undefined
26
26
  }
@@ -103,8 +103,9 @@ export default Store => {
103
103
  const oldTab = tabs[index]
104
104
  const oldBatch = oldTab.batch
105
105
 
106
- // Reload state is captured only for an SSH refresh/reconnect. Closing a
107
- // tab goes through removeTabs and never reaches this code path.
106
+ // Reload state is captured only for a shell terminal refresh/reconnect
107
+ // (ssh, local, telnet, serial). Closing a tab goes through removeTabs
108
+ // and never reaches this code path.
108
109
  const reloadState = captureSshSessionState(oldTab, store.config)
109
110
 
110
111
  // Create copy of old tab with new ID
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "5.5.6",
3
+ "version": "5.5.9",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",