Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor doesn't find the correct char offset to edit in Internet Explorer 11 #2108

Closed
alexlehm opened this issue Feb 3, 2014 · 3 comments
Closed
Assignees
Labels
affects:editor Work relating to the Koenig Editor bug [triage] something behaving unexpectedly
Milestone

Comments

@alexlehm
Copy link

alexlehm commented Feb 3, 2014

Issue Summary

I was doing some tests with different browsers to reproduce the error described in #1007 and I noticed an issue with the editor in Internet Explorer 11, it seems to calculate the offset of the chars to edit wrong sometimes.

Steps to Reproduce

Start with a default installation of Ghost and change the text of the starter article to

the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The 

The edit window inserts a linebreak line this

the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The 

However when moving the cursor around, the editor seems to think that the first line ends after brown and the 2nd line has 4 more characters that appear as blanks.

When editing the 2nd line, the typed chars are inserted 4 chars to the left, e.g. if you type a char into the 2nd char of the line (between j and u), it is inserted in the previous word resulting in fQopx.

For some reason the calculation assumes that the last word in the previous line is wrapped around to the beginning of the 2nd line.

Technical details

  • Ghost Version: 0.4.1
  • Client OS: Windows 7 64 bit
  • Server OS: Windows 7 64 bit
  • Node Version: node.js v0.10.24
  • Browser: Internet Explorer 11.0.2

Since this is probably related to the font layout, I should mention that my screen has a resolution of 1920x1080

Please take a look at the screen recording, there you should see the error.

ghost_edit

Basically the offset is 4 chars to the left, which is the the width of the " fox" word in the line above and the additional spaces in the current line.

@ErisDS
Copy link
Member

ErisDS commented Feb 3, 2014

@alexlehm Firstly, I'd really appreciate if you took a few second to update this bug report to match our template although this is an 'IE11' bug, Windows has a funny way of making sure the OS version matters too etc.

It's also pretty hard to follow what you're doing in the screencast, I have no way of knowing which button you're pressing, and it's hard to watch both sides at the same time, so I'm not 100% sure what's going on.

I'd really appreciate a clear set of reproduction steps.

I believe the issue you're running into is one of several CodeMirror bugs: codemirror/codemirror5#1913, codemirror/codemirror5#1957

We're going to have to wait for CodeMirror to fix them, or replace CodeMirror, one of which should happen in milestone 0.7.

@ErisDS ErisDS added bug labels Feb 3, 2014
@ErisDS ErisDS added this to the 0.7 milestone Feb 3, 2014
@davidwesst
Copy link

Hello there,

I've been hitting the same issue as well in IE11, except on Windows 8.1 64bit. I'll do my best to follow the template as you've recommended. If you need anything else to clarify it, please let me know as I'd be happy to help get this resolved!

Screen capture will be available on Vimeo here when the conversion is complete.

Issue Summary

If you enter a word at the end of the line that is fills the line to the exact character maximum for line and add a space, the word will return to the previous line instead of wrapping, and cursor will be pushed ahead by the number of characters of the word that caused the wrap.

Steps to Reproduce

  1. Login to Ghost
  2. Add a new Post
  3. Type text until you get close to the end of the first line (5 or 6 characters worked for me)
  4. Enter in a word that forces the editor to move the word to the next line. note the number of characters that forces a word to go to the next line
  5. Delete one character so the word returns to the previous line.
  6. Add a space character to the end of the new smaller word. this should cause the word to wrap onto the next line
  7. Keep typing, and the cursor should be ahead by the number of characters contained by the "smaller word"
  8. Done

There is an offset in the editor that pushes the cursor over by a number of characters, making it challenging to write content.

Technical details

  • Ghost Version: 75d15ea
  • Client OS: Windows 8.1
  • Server OS: Windows Azure Web Sites
  • Node Version: 10.5
  • Browser: Internet Explorer 11 (11.0.9600.16518)

@ErisDS ErisDS modified the milestones: 0.4.2, 0.7 Mar 11, 2014
@ErisDS ErisDS self-assigned this Mar 11, 2014
@ErisDS
Copy link
Member

ErisDS commented Mar 11, 2014

I am in the process of upgrading CodeMirror to resolve this.

ErisDS added a commit to ErisDS/Ghost that referenced this issue Mar 17, 2014
issue TryGhost#2385, issue TryGhost#2108

- Separate out the various objects which form the editor into their own
  modules
- Decouple the modules where possible
- Rename and reshuffle bits of modules for consistency
- Minimise public APIs of the modules, and ensure they are consistent
- Add comments to the modules
@ErisDS ErisDS closed this as completed in 6d3cd84 Mar 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:editor Work relating to the Koenig Editor bug [triage] something behaving unexpectedly
Projects
None yet
Development

No branches or pull requests

3 participants