tangram-play icon indicating copy to clipboard operation
tangram-play copied to clipboard

Switching tabs sometimes causes the editor to be positioned incorrectly (Safari)

Open louh opened this issue 8 years ago • 0 comments

To recreate this:

  1. Open an import in a new file tab.
  2. In the original tab, place your cursor at the end of a word-wrapped line, where the "word" is force-wrapped because it is too long to break. For instance, the end of a long import URL.
  3. Switch to the other tab.
  4. Switch back to the original tab.

The CodeMirror-sizer will be too wide, even after editor.refresh(). This causes the editor pane to be offset by some quantity to the left.

screenshot 2016-12-22 11 53 06

The pane cannot be scrolled (and using a swipe gesture can ruin navigation state, which is worse), and it only resets if you place the cursor elsewhere and change tabs again.

louh avatar Dec 22 '16 16:12 louh