Error message won't close when hitting "dismiss" button



5 years ago
5 years ago


(Reporter: Jacob, Assigned: pomax)



(Whiteboard: mozfest)


(1 attachment)



5 years ago
Thought we fixed this, but here it is

Tried to hit "dismiss" to close the error message, but nothing happened
Confirmed.  you can see this here, too.
Assignee: nobody → pomax
Whiteboard: mozfest

Comment 2

5 years ago
This looks like it only happens when you open a page that already has an error on it. The web console reports:

Uncaught TypeError: Cannot call method 'getBoundingClientRect' of undefined gutter-pointer.js:48
gutterPointer gutter-pointer.js:48
Relocator.relocator.relocate relocator.js:71
reportError error-help.js:70
(anonymous function) error-help.js:87
GET 404 (Not Found) 

so it looks like the error message tries to attach itself to CodeMirror, before CodeMirror is done setting up all its on-page components.

Comment 3

5 years ago
Created attachment 812321 [details] [review]

best bug in recent history. Errors are tied to the codemirror cursor for placement, but when you load a project with bad code, there is no cursor position yet, and all placement bets are off. This patch checks to see if there is an error after slowparsing, and if so, whether there is a cursor position. If there is no cursor position, it actually tells codeMirror what the cursor's position should be before handing off the error handling to the rest of the code. This does two things:

1. the error dialog is now in the right place, and dismissable
2. the code editor will immediately "scoll" to the offending section of the page so you don't have to go looking for where the error is. It'll be immediately obvious.

STR: run locally, copy code from and publish locally. Loading up the /edit link in a new tab will show the error dialog majestically in the way. Check out patch, rerun thimble, open page; the dialog should now be in the right place, and the code scrolled all the way to the bottom with line 421 the operative error anchor.
Attachment #812321 - Flags: review?(scott)
Attachment #812321 - Flags: review?(scott) → review+

Comment 5

5 years ago
Commit pushed to master at
Merge pull request #241 from Pomax/bug919636

tell codemirror where an error is, if the cursor is at 0/0

Comment 6

5 years ago
Last Resolved: 5 years ago
Resolution: --- → FIXED
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.