cursor misplaced on lines wrapped after a backslash on safari#1825
Closed
jdleesmiller wants to merge 1 commit intocodemirror:masterfrom
Closed
cursor misplaced on lines wrapped after a backslash on safari#1825jdleesmiller wants to merge 1 commit intocodemirror:masterfrom
jdleesmiller wants to merge 1 commit intocodemirror:masterfrom
Conversation
marijnh
added a commit
that referenced
this pull request
Sep 16, 2013
Member
|
Thanks for figuring that out. In current Webkit builds the bug that necessitates this hack is fixed. But many people will be stuck with older Safaris for ages to come, so indeed this is good to fix. I've pushed a patch (attached) that also adds the backslash to the util script that was used to generate this regexp. |
anaran
pushed a commit
to anaran/CodeMirror
that referenced
this pull request
Feb 22, 2014
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a suggested fix for the following issue:
Steps to reproduce:
and enter
so that the line wraps between the "" and the "(".
2. Insert a character on the second line.
The inserted character does not appear in the expected position.
Reported on Safari 5.0.6 on OSX 10.5.8. Reproduced on Safari 6.0.5 on OSX 10.7.5. I couldn't reproduce it on any of the other browsers I tried -- works fine on Chrome 29 on Mac and Windows, FireFox 23 on Mac and Windows, and IE8.
Adding backslash to the final regular expression in spanAffectsWrapping for webkit appears to fix the issue on Safari 6. All tests still pass on Safari 6 & the non-Safari browsers listed above.
This won't help on Safari 5.0.6, which is matched by one of the earlier if-else conditions, but it looks that version is no longer officially supported (Safari 5.2+ only), so I'm not sure about making any other changes.
Note that unlike #1809 this appears to affect old and stable versions of Safari.