Closed Bug 301837 Opened 19 years ago Closed 19 years ago

NaN appears when entering a letter and/or symbol in the history "days" box

Categories

(Firefox :: Settings UI, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED
Firefox1.5

People

(Reporter: BlindWolf8, Assigned: tonglebeak)

References

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050723 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050723 Firefox/1.0+

See summary above and steps below

Reproducible: Always

Steps to Reproduce:
1. Open to DPa2
2. Go to Tools -> Options -> Privacy tab -> History
3. Click on the history days box in front of the number, so the caret is here:
   ---> |9
4. Enter a letter or symbol now
5. See NaN

***NOTE: When the caret is here ---> 9| and you eneter a letter, it appears but
quickly disappears.  When you have a number like, say, 95, and your caret is
here ---> 9|5, and you enter a letter, this gets rid of the 5, and leaves it
like this: 9|***

Actual Results:  
Showed Nan in the box

Expected Results:  
Disregarded the letter/symbol input

Using: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050723
Firefox/1.0+ ID:2005072306
Zip build
Flags: blocking-aviary1.5?
*** Bug 301838 has been marked as a duplicate of this bug. ***
This is not a dupe as the summaries are different.  I was originally thinking of
grouping them together.
both seem to be the same bug 299580, but that should been fixed 2 weeks ago
Attached patch patchSplinter Review
This simply checks if the inputted value will spit out an NaN, and if so, 0 is
returned. Else, the input is returned.
Attachment #190281 - Flags: review?(mconnor)
Comment on attachment 190281 [details] [diff] [review]
patch

ok, I'll live with the hack in privacy.js, but only because the whole function
is a hack
Attachment #190281 - Flags: review?(mconnor)
Attachment #190281 - Flags: review+
Attachment #190281 - Flags: approval1.8b4+
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → tonglebeak
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Firefox1.1
Version: unspecified → Trunk
Checking in browser/components/preferences/privacy.js;
/cvsroot/mozilla/browser/components/preferences/privacy.js,v  <--  privacy.js
new revision: 1.9; previous revision: 1.8
done
Checking in toolkit/content/widgets/preferences.xml;
/cvsroot/mozilla/toolkit/content/widgets/preferences.xml,v  <--  preferences.xml
new revision: 1.26; previous revision: 1.25
done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Flags: blocking-aviary1.5?
Isn't 301838 a valid issue, or do the history "days" box and the cache "amount"
box share this same code?
(In reply to comment #7)
> Isn't 301838 a valid issue, or do the history "days" box and the cache "amount"
> box share this same code?

The patch covered for both issues.
Somehow I managed to miss declaring intValue in preferences.xml. It didn't
affect the bug, so I'm leaving this as resolved->fixed, but it does spit out a
warning in the js console. This will take care of that.
Attachment #190327 - Flags: review?(mconnor)
Attachment #190327 - Flags: approval1.8b4?
Attachment #190327 - Flags: review?(mconnor)
Attachment #190327 - Flags: review+
Attachment #190327 - Flags: approval1.8b4?
Attachment #190327 - Flags: approval1.8b4+
Checked in followup patch.

Checking in preferences.xml;
/cvsroot/mozilla/toolkit/content/widgets/preferences.xml,v  <--  preferences.xml
new revision: 1.27; previous revision: 1.26
done
Depends on: 445049
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: