All users were logged out of Bugzilla on October 13th, 2018

PageDown (JavaScript Markdown editor) behaves strangely

RESOLVED FIXED in Firefox 21

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: fischer.daniel94, Assigned: sstangl)

Tracking

({regression, testcase})

Trunk
mozilla23
regression, testcase
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox20 unaffected, firefox21+ fixed, firefox22+ fixed, firefox23 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:22.0) Gecko/20130321 Firefox/22.0
Build ID: 20130321040204

Steps to reproduce:

- Go to http://stackoverflow.com/questions/ask
- Put in at least two lines of text
- Select the text
- Click the 'code' button (curly brackets)


Actual results:

Lines are indented by four spaces and the string 'visible' is put in front of the result.
Things get worse when you repeatedly click the 'code' button.
Other buttons also behave incorrectly.
This is also not a problem that happens on StackOverflow only - it happens with all installations of PageDown.


Expected results:

Lines should just be indented by four spaces.
This works correctly in Safari 6.0.3, Chrome 25.0.1364.172 and Firefox 19.0.2.
(Reporter)

Comment 1

6 years ago
Test page that doesn't require a login: http://pagedown.googlecode.com/hg/demo/browser/demo.html

Gives me 'p' instead of 'visible' though.
I can reproduce the problem on Aurora (21) but not in Beta (20).
Keywords: regression, regressionwindow-wanted, testcase-wanted
OS: Mac OS X → All
Hardware: x86 → All
Last good nightly: 2013-01-15
First bad nightly: 2013-01-16

Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=56ff556e74d9&tochange=d8be4bc4fba8
The first bad revision is:
changeset:   118828:d13d8a663302
user:        Sean Stangl <sstangl@mozilla.com>
date:        Fri Jan 11 17:19:53 2013 -0800
summary:     Bug 820124, Part 2/2 - Handle fast removal in str_replace(). r=dvan
der
Assignee: nobody → general
Blocks: 820124
Status: UNCONFIRMED → NEW
status-firefox20: --- → unaffected
status-firefox21: --- → affected
tracking-firefox22: --- → ?
Component: General → JavaScript Engine
Ever confirmed: true
Keywords: regressionwindow-wanted
tracking-firefox21: --- → ?
Tracking and passing this on to Sean as this could be a regression from Bug 820124 per comment# 4. Please reassign if needed
Assignee: general → sstangl

Updated

6 years ago
tracking-firefox21: ? → +
tracking-firefox22: ? → +
(Assignee)

Comment 6

6 years ago
(In reply to bhavana bajaj [:bajaj] from comment #5)
> Tracking and passing this on to Sean as this could be a regression from Bug
> 820124 per comment# 4. Please reassign if needed

Please set needinfo? instead of assigning me to the bug (or do both). I do not get notification of assignation, but needinfo? is easily recognizable in my inbox, and changes state in Bugzilla's "My Requests" panel.

I did not notice that I was assigned to this bug until just now, when bz pointed it out.
(Assignee)

Comment 7

6 years ago
(In reply to fischer.daniel94 from comment #1)
> Test page that doesn't require a login:
> http://pagedown.googlecode.com/hg/demo/browser/demo.html

Thanks for the standalone version. I've managed to reduce the issue to the following testcase, which passes on release but fails on nightly:

"p".match(/(p)/);
"x\ny\n".replace(/(^\n*)/, "");
assertEq(RegExp.$1, "");

Fix soon.
(Assignee)

Comment 8

6 years ago
Created attachment 731363 [details] [diff] [review]
Update RegExpStatics on empty match in str_replace_regexp_remove().

Will also include testcase from previous comment.
Attachment #731363 - Flags: review?(dvander)
Attachment #731363 - Flags: review?(dvander) → review+
https://hg.mozilla.org/mozilla-central/rev/a791e64589fb
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
(In reply to Sean Stangl [:sstangl] from comment #9)
> https://hg.mozilla.org/integration/mozilla-inbound/rev/a791e64589fb
> 
> Should be hoisted to 21 and 22.

Looks like this is fixed on trunk, please request approval nomination for aurora,beta to get this uplifted.
(Assignee)

Comment 12

6 years ago
Comment on attachment 731363 [details] [diff] [review]
Update RegExpStatics on empty match in str_replace_regexp_remove().

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 820124
User impact if declined: The RegExp global may not be updated after a call to replace(). This affects websites such as the PageDown editor mentioned in Comment 0.
Testing completed (on m-c, etc.): m-c
Risk to taking this patch (and alternatives if risky): None
String or IDL/UUID changes made by this patch: None
Attachment #731363 - Flags: approval-mozilla-beta?
Attachment #731363 - Flags: approval-mozilla-aurora?
(In reply to fischer.daniel94 from comment #0)
> User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:22.0)
> Gecko/20130321 Firefox/22.0
> Build ID: 20130321040204
> 
> Steps to reproduce:
> 
> - Go to http://stackoverflow.com/questions/ask
> - Put in at least two lines of text
> - Select the text
> - Click the 'code' button (curly brackets)
> 
> 
> Actual results:
> 
> Lines are indented by four spaces and the string 'visible' is put in front
> of the result.
> Things get worse when you repeatedly click the 'code' button.
> Other buttons also behave incorrectly.
> This is also not a problem that happens on StackOverflow only - it happens
> with all installations of PageDown.
> 
> 
> Expected results:
> 
> Lines should just be indented by four spaces.
> This works correctly in Safari 6.0.3, Chrome 25.0.1364.172 and Firefox
> 19.0.2.

Hi, the fix for the issue you reported is landed on mozilla-central.Can you please help us verify this issue is fixed for you in the latest nightly ? Thanks in advance for your help !
Comment on attachment 731363 [details] [diff] [review]
Update RegExpStatics on empty match in str_replace_regexp_remove().

low risk fix for a Fx 21 regression impacting websites which may be using pagedown editor.(known site impacted is stack overflow)
Attachment #731363 - Flags: approval-mozilla-beta?
Attachment #731363 - Flags: approval-mozilla-beta+
Attachment #731363 - Flags: approval-mozilla-aurora?
Attachment #731363 - Flags: approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/6f10eb2a9395
https://hg.mozilla.org/releases/mozilla-beta/rev/7dca48b8f4a4
status-firefox21: affected → fixed
status-firefox22: --- → fixed
status-firefox23: --- → fixed

Updated

6 years ago
Keywords: testcase-wanted → testcase
You need to log in before you can comment on or make changes to this bug.