Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Extra newline when pasting "abc\n"
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bobby  
View profile  
 More options Feb 3 2012, 9:35 pm
From: Bobby <bobbysoa...@gmail.com>
Date: Fri, 3 Feb 2012 18:35:48 -0800 (PST)
Local: Fri, Feb 3 2012 9:35 pm
Subject: Extra newline when pasting "abc\n"
Looks like a recently introduced bug. When pasting text ending with a
newline, an extra newline is introduced.

Pasting "abc\n" three times yields "abc\n\nabc\n\nabc\n". It works as
expected if pasting is interleaved with mouse clicks. Perhaps the
cursor position is not being set correctly after pasting?

Bobby


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Kroon  
View profile  
 More options Feb 4 2012, 4:30 am
From: Peter Kroon <plakr...@gmail.com>
Date: Sat, 4 Feb 2012 10:30:29 +0100
Local: Sat, Feb 4 2012 4:30 am
Subject: Re: [CodeMirror] Extra newline when pasting "abc\n"

I just tried to reproduce this at:
http://codemirror.net/mode/clike/index.html
Pasting abc\n on line 2 does not create a newline for me.
When pressing enter after abc\n I get a newline with indention.
Not sure if this is standard behaviour.

2012/2/4 Bobby <bobbysoa...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marijn Haverbeke  
View profile  
 More options Feb 6 2012, 5:35 am
From: Marijn Haverbeke <mari...@gmail.com>
Date: Mon, 6 Feb 2012 11:35:21 +0100
Local: Mon, Feb 6 2012 5:35 am
Subject: Re: [CodeMirror] Extra newline when pasting "abc\n"
This appears to be a Webkit bug that's been open for over a year [1].
CodeMirror uses a textarea to read input, so bugs in the underlying
textarea implementation will shine through. A workaround with adding
extra bogus characters to the end of the textarea would be possible,
but I think this isn't a major enough problem to justify such an
invasive hack, which is likely to cause new issues. So I guess putting
pressure on the Webkit people to fix this is your best option.

[1]: https://bugs.webkit.org/show_bug.cgi?id=49288

Best,
Marijn


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Kroon  
View profile  
 More options Feb 6 2012, 6:42 am
From: Peter Kroon <plakr...@gmail.com>
Date: Mon, 6 Feb 2012 12:42:38 +0100
Local: Mon, Feb 6 2012 6:42 am
Subject: Re: [CodeMirror] Extra newline when pasting "abc\n"

Sorry, I don't get it.
When pasting abc\n in a textarea in a WebKit browser(Canary, Safari tested
W7)  doesn't give me a new line at all.
Demo: http://jsfiddle.net/fxKXS/
Only 1 newline when pressing enter.

2012/2/6 Marijn Haverbeke <mari...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marijn Haverbeke  
View profile  
 More options Feb 6 2012, 6:44 am
From: Marijn Haverbeke <mari...@gmail.com>
Date: Mon, 6 Feb 2012 12:44:40 +0100
Local: Mon, Feb 6 2012 6:44 am
Subject: Re: [CodeMirror] Extra newline when pasting "abc\n"
You have to paste it multiple times in a row, as described in the
original report.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Kroon  
View profile  
 More options Feb 6 2012, 6:46 am
From: Peter Kroon <plakr...@gmail.com>
Date: Mon, 6 Feb 2012 12:46:10 +0100
Local: Mon, Feb 6 2012 6:46 am
Subject: Re: [CodeMirror] Extra newline when pasting "abc\n"

I did, same result on my machine here..

2012/2/6 Marijn Haverbeke <mari...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Demarest  
View profile  
 More options Sep 10 2012, 7:26 pm
From: Ken Demarest <ken.demar...@gmail.com>
Date: Mon, 10 Sep 2012 16:26:38 -0700 (PDT)
Local: Mon, Sep 10 2012 7:26 pm
Subject: Re: [CodeMirror] Extra newline when pasting "abc\n"

I am seeing this on Chrome in Linux.  I think I could make a fix if I could
detect when a paste has just occurred.

Marijn, is there a non-hacky way to detect a paste?

Ken


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marijn Haverbeke  
View profile  
 More options Sep 11 2012, 7:45 am
From: Marijn Haverbeke <mari...@gmail.com>
Date: Tue, 11 Sep 2012 13:45:56 +0200
Local: Tues, Sep 11 2012 7:45 am
Subject: Re: [CodeMirror] Extra newline when pasting "abc\n"
There's the 'paste' event, which fires right *before* a paste, but is
not entirely reliable.

This bug has been fixed in Webkit. I guess, but haven't tested that
Chrome's dev channel already contains the fix. So my plan is to just
ride it out, since Chrome users upgrade quickly.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »