Closed Bug 421410 Opened 14 years ago Closed 14 years ago
selected text in input box is cleared/unselected after print preview
selected text in input box is cleared/unselected after printing (print preview is OK) 1. select any text typed into bugzilla description field 2. file|print Expected results: text still selected Actual results: text selection has been cleared/unselected Similar to Bug 304313 - selected text cleared/unselected after print preview. So perhaps whatever was used to fix that would help this? Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b5pre) Gecko/2008030506 Minefield/3.0b5pre
This happens because the focus isn't returned to the text input after print preview, see discussion in bug 128953 as to why you don't see a selection when the input is blurred. So this bug is basically about "Focus isn't returned to the element that had focus before print preview".
And that should probably be fixed somewhere around here: http://lxr.mozilla.org/seamonkey/source/toolkit/components/printing/content/printUtils.js#261
Oops, I misread the bug, it's actually working for you for print preview, which is strange, because it's not working for me on print preview, but it's working fine for me with printing.
yeah, odd. I thought I was pretty careful in writing it up - but what I'm seeing now is what you say. So I got it backward - print OK, preview not. interesting when using _print_ if a dialog is not not on screen - the intitial print dialog and the progress dialog- then the selection is visible but when dialog is up the selection is not visible - is that what you are saying in comment 1?
Status: UNCONFIRMED → NEW
Component: Printing → Print Preview
Ever confirmed: true
Summary: selected text in input box is cleared/unselected after printing → selected text in input box is cleared/unselected after print preview
Yeah, that's what I was saying (sort of). The selection of text controls is made invisible when the focus moves away from it.
This fixes it. It basically makes use of the code in bug 323805. I couldn't find a Seamonkey version of printUtils.js, perhaps it uses the same file, I don't know. I guess it might be better if gFocusedElement is a member of PrintUtils, right?
Attachment #308024 - Flags: review?(enndeakin)
Comment on attachment 308024 [details] [diff] [review] patch Seems OK
Attachment #308024 - Flags: review?(enndeakin) → review+
Comment on attachment 308024 [details] [diff] [review] patch a1.9=beltzner
Attachment #308024 - Flags: approval1.9? → approval1.9+
Assignee: nobody → martijn.martijn
Checking in toolkit/components/printing/content/printUtils.js; /cvsroot/mozilla/toolkit/components/printing/content/printUtils.js,v <-- printUtils.js new revision: 1.31; previous revision: 1.30 done
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta5
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.