Closed Bug 1505824 Opened 6 years ago Closed 6 years ago

Improper error message if input text instead of numeric value to jump to desired pdf page

Categories

(Firefox :: PDF Viewer, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 65
Tracking Status
firefox63 --- wontfix
firefox64 --- wontfix
firefox65 --- fixed

People

(Reporter: cfogel, Unassigned)

References

()

Details

Attachments

(1 file)

Attached image console_logMSG.png
[Affected versions]: - Firefox: 63.0.1, 64.0b7, 65.0a1 (2018-11-05) [Affected platforms]: - win 10x64; macOS 10.12; Ubuntu16.04; [Steps to reproduce]: 1. Launch Firefox; 2. Open DevTools-Console; 3. Access any pdf file, ex: http://www.nwu.ac.za/files/images/Basic_Curriculum_Vitae_example.pdf 4. Click inside the current page button; 5. Input a text not numeric value; 6. Press the Enter key; [Expected result]: - Error message displayed in the console; [Actual result]: - PDFViewer_setCurrentPageNumber: "0" is out of bounds. - the fact that it's not a numeric value in the input, a proper message could be displayed in the logs; [Regression range]: marking dates on when this log message was added; - last good: 2016-08-18 - first bad: 2016-08-19 [Additional notes]: - attached screenshot with the issue: * the first message was for a numeric value; * the second message was for a text value; - older versions did not post any error message and set the value to 1; - this can be viewed more as an enhancement suggestion;
The message is printed from https://searchfox.org/mozilla-central/rev/17f55aee76b7c4610a974cffd3453454e0c8de7b/browser/extensions/pdfjs/content/web/viewer.js#6590 Here's the stacktrace: _setCurrentPageNumber (viewer.js#6590) currentPageNumber (viewer.js#6580) currentPageLabel (viewer.js#6614) webViewerPageNumberChanged (viewer.js#1498) dispatch (viewer.js#2309) dispatch (viewer.js#2308) _bindListeners (viewer.js#8558) This comes from a "change" event listener https://searchfox.org/mozilla-central/rev/17f55aee76b7c4610a974cffd3453454e0c8de7b/browser/extensions/pdfjs/content/web/viewer.js#8558 in a input[type=number]
Component: Console → PDF Viewer
Product: DevTools → Firefox
Summary: Console - improper error message if input text instead of numeric value to jump to desired pdf page → Improper error message if input text instead of numeric value to jump to desired pdf page
Status: NEW → RESOLVED
Closed: 6 years ago
Depends on: 1508275
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
QA Whiteboard: [good first verify]

I have reproduced this bug with Nightly 65.0a1 (2018-11-08) on Windows 10, 64 Bit!

This bug's fix is verified with latest Beta 65.0b10!

Build ID - 20190110221328
User Agent - Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0

QA Whiteboard: [good first verify] → [good first verify] [testday20190111]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: