tldraw/apps/examples/e2e/tests
Taha f73bf9a7fe
Fix text-wrapping on Safari (#1980)
Co-authored-by: Alex Alex@dytry.ch

closes [#1978](https://github.com/tldraw/tldraw/issues/1978)

Text was wrapping on Safari because the measure text div was rendered
differently on different browsers. Interestingly, when forcing the
text-measure div to be visible and on-screen in Chrome, the same
text-wrapping behaviour was apparent. By setting white-space to 'pre'
when width hasn't been set by the user, we can ensure that only line
breaks the user has inputted are rendered by default on all browsers.

### Change Type

- [x] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [ ] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Test Plan

1. On Safari
2. Make a new text shape and start typing
3. At a certain point the text starts to wrap without the width having
been set


### Release Notes

- Fix text wrapping differently on Safari and Chrome/Firefox

Before/After

<image width="350"
src="https://github.com/tldraw/tldraw/assets/98838967/320171b4-61e0-4a41-b8d3-830bd90bea65">
<image width="350"
src="https://github.com/tldraw/tldraw/assets/98838967/b42d7156-0ce9-4894-9692-9338dc931b79">
2023-10-02 11:30:53 +00:00
..
export-snapshots.spec.ts-snapshots ShapeUtil.getGeometry, selection rewrite (#1751) 2023-07-25 16:10:15 +00:00
export-snapshots.spec.ts ShapeUtil.getGeometry, selection rewrite (#1751) 2023-07-25 16:10:15 +00:00
test-camera.spec.ts Add playwright tests (#1484) 2023-05-30 15:28:56 +01:00
test-canvas-events.spec.ts Remove focus management (#1953) 2023-10-02 11:29:54 +00:00
test-clipboard.spec.ts Rename shapes apis (#1787) 2023-08-02 18:12:25 +00:00
test-focus.spec.ts Remove focus management (#1953) 2023-10-02 11:29:54 +00:00
test-kbds.spec.ts [improvement] quick actions (#1922) 2023-09-19 15:33:39 +00:00
test-routes.spec.ts Add snapshot prop, examples (#1856) 2023-09-08 14:48:55 +00:00
test-shapes.spec.ts [improvement] quick actions (#1922) 2023-09-19 15:33:39 +00:00
test-smoke.spec.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
test-text.spec.ts Fix text-wrapping on Safari (#1980) 2023-10-02 11:30:53 +00:00