Misspelled words in text areas cause all following text to disappear during print.

RESOLVED FIXED

Status

()

Core
Printing: Output
--
minor
RESOLVED FIXED
11 years ago
10 years ago

People

(Reporter: Darren Baker, Assigned: Martijn Wargers (dead))

Tracking

({relnote, verified1.8.1.1})

1.8 Branch
relnote, verified1.8.1.1
Points:
---
Bug Flags:
blocking1.8.1 -
blocking1.8.1.1 +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(4 attachments, 1 obsolete attachment)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20060918 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20060918 Firefox/2.0

A misspelled word (underlined in red) will cause itself and all following words within a text area tag to disappear during the print. The red underlines will remain, but that is all.

Reproducible: Always

Steps to Reproduce:
1. Find a text area.
2. Enter a misspelled word.
3. Print as usual, it matters not what printer driver.
4. Shred useless hard copy.

Actual Results:  
I got confused, and thought it was something I had done.

Expected Results:  
Printed the text after the misspelled word.

about:buildconfig

Build platform
target
i586-pc-msvc

Build tools
Compiler 	Version 	Compiler flags
$(CYGWIN_WRAPPER) cl 	12.00.8804 	-TC -nologo -W3 -Gy -Fd$(PDBFILE)
$(CYGWIN_WRAPPER) cl 	12.00.8804 	-TP -nologo -W3 -Gy -Fd$(PDBFILE)

Configure arguments
--enable-application=browser --enable-update-channel=release --enable-official-branding --enable-optimize --disable-debug --disable-tests --enable-static --disable-shared --enable-svg --enable-canvas --enable-update-packaging

Comment 1

11 years ago
I see this on Linux, too.
Assignee: nobody → printing
Status: UNCONFIRMED → NEW
Component: General → Printing
Ever confirmed: true
OS: Windows XP → All
Product: Firefox → Core
QA Contact: general
Hardware: PC → All
Version: unspecified → 1.8 Branch

Updated

11 years ago

Comment 2

11 years ago
Nominating blocking to see what drivers think of this issue. It is probably related to bug 221023. It is likely a similar simple issue, but the code involved is complex and scary.
Flags: blocking1.8.1?

Comment 3

11 years ago
The related bug was bug 336679, the number in comment 2 was the attachment
I agree with Brett, and also don't think that this will be a common enough use case to block shipping Firefox 2. We'll relnote this, and I've nominated it for 1.8.1.1 so we can try to get it in a security and stability fixpack.
Flags: blocking1.8.1?
Flags: blocking1.8.1.1?
Flags: blocking1.8.1-
Keywords: relnote
(Assignee)

Comment 5

11 years ago
Created attachment 242054 [details] [diff] [review]
patch for disabling spellcheck inside print/printpreview

Since it is not working well, maybe just disable the spell-checking at all inside printing/print preview?
Attachment #242054 - Flags: review?(brettw)
(Assignee)

Comment 6

11 years ago
Created attachment 242055 [details] [diff] [review]
disable selection inside print preview

I also noticed that selecting something inside textarea's is possible in print preview. This patch fixes that. Not sure if it is any good.

Updated

11 years ago
Attachment #242054 - Flags: review?(brettw) → review+
(Assignee)

Updated

11 years ago
Attachment #242054 - Flags: superreview?(roc)
+    nsCOMPtr<nsPresContext> context = presShell->GetPresContext();

This can be nsPresContext*

Instead of checking the type, just check IsDynamic().
*** Bug 358725 has been marked as a duplicate of this bug. ***

Comment 9

11 years ago
*** Bug 359941 has been marked as a duplicate of this bug. ***

Comment 10

11 years ago
*** Bug 357998 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 11

11 years ago
Created attachment 245627 [details] [diff] [review]
patchv2

Oops, I kind of forgot about the patch.
Attachment #242054 - Attachment is obsolete: true
Attachment #245627 - Flags: superreview?(roc)
Attachment #245627 - Flags: review?(roc)
Attachment #242054 - Flags: superreview?(roc)
(Assignee)

Comment 12

11 years ago
Comment on attachment 242055 [details] [diff] [review]
disable selection inside print preview

It seems to me this also makes sense, not?
Attachment #242055 - Flags: review?(roc)
Attachment #242055 - Flags: superreview+
Attachment #242055 - Flags: review?(roc)
Attachment #242055 - Flags: review+
Comment on attachment 245627 [details] [diff] [review]
patchv2

OK for the first hunk ... the rest is some other patch
Attachment #245627 - Flags: superreview?(roc)
Attachment #245627 - Flags: superreview+
Attachment #245627 - Flags: review?(roc)
Attachment #245627 - Flags: review+
(Assignee)

Comment 14

11 years ago
Created attachment 245638 [details] [diff] [review]
patch

Oops, yes, the rest was from some other patch, this is what I'm going to check in.
(Assignee)

Comment 15

11 years ago
Checking in nsEditor.cpp;
/cvsroot/mozilla/editor/libeditor/base/nsEditor.cpp,v  <--  nsEditor.cpp
new revision: 1.479; previous revision: 1.478
done

Checking in ua.css;
/cvsroot/mozilla/layout/style/ua.css,v  <--  ua.css
new revision: 3.228; previous revision: 3.227
done

Checked both patches in on trunk.
Assignee: printing → martijn.martijn
(Assignee)

Updated

11 years ago
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED

Comment 16

11 years ago
Great work,

Il test it asap.

Any change you could also take a look at this bug?
Im not sure but it might be your turf.
bug: 358727
(Assignee)

Comment 17

11 years ago
Comment on attachment 245638 [details] [diff] [review]
patch

I think this is safe enough that it should go on 1.8.1.1.
It fixes a nasty regression where people aren't able to print text in textareas a lot of the time.
Attachment #245638 - Flags: approval1.8.1.1?
Flags: blocking1.8.1.1? → blocking1.8.1.1+
Comment on attachment 245638 [details] [diff] [review]
patch

approved for 1.8 branch, a=dveditz for drivers
Attachment #245638 - Flags: approval1.8.1.1? → approval1.8.1.1+
(Assignee)

Comment 19

11 years ago
Created attachment 246100 [details] [diff] [review]
branch patch

Sorry, I should have tested the patch on branch before asking approval1.81.
The patch gives a compile error because isdynamic() doesn't exist on branch.
So I reverted back to using:
    if (context->Type() == nsPresContext::eContext_PrintPreview ||
        context->Type() == nsPresContext::eContext_Print) {
on branch, which works fine.
Attachment #246100 - Flags: superreview?(roc)
Attachment #246100 - Flags: review?(roc)
Attachment #246100 - Flags: review?(roc) → review+
Attachment #246100 - Flags: superreview?(roc) → superreview+
(Assignee)

Updated

11 years ago
Attachment #246100 - Flags: approval1.8.1.1?

Comment 20

11 years ago
Comment on attachment 246100 [details] [diff] [review]
branch patch

Approved for the 1.8.1 branch, a=jay for drivers.  

Martijn: Thanks for the quick updated patch, please land asap.  Thanks!
Attachment #246100 - Flags: approval1.8.1.1? → approval1.8.1.1+
(Assignee)

Comment 21

11 years ago
Checking in nsEditor.cpp;
/cvsroot/mozilla/editor/libeditor/base/nsEditor.cpp,v  <--  nsEditor.cpp
new revision: 1.447.4.9; previous revision: 1.447.4.8
done

Checked in on the 1.8.1 branch.
Keywords: fixed1.8.1
Keywords: fixed1.8.1 → fixed1.8.1.1

Updated

11 years ago
Depends on: 361808
Verified using Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.1pre) Gecko/20061201 BonEcho/2.0.0.1pre. I verified using the original STR. My printed page shows all the text. Adding keyword.
Keywords: fixed1.8.1.1 → verified1.8.1.1
Re-verified on Vista, XP, Mac, Linux Fx 2.0.0.4. Pages with spell checked fields print correctly.
You need to log in before you can comment on or make changes to this bug.