Closed Bug 919636 Opened 11 years ago Closed 11 years ago

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

Categories

(Webmaker Graveyard :: Thimble, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Jacob, Assigned: michiel)

Details

(Whiteboard: mozfest)

Attachments

(1 file)

Thought we fixed this, but here it is

https://thimble.webmaker.org/project/15678/remix

Tried to hit "dismiss" to close the error message, but nothing happened
Confirmed.  you can see this here, too.

https://thimble.webmaker.org/project/15677/remix
Assignee: nobody → pomax
Whiteboard: mozfest
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 https://thimble.webmaker.org/resources/fonts/opensans-bolditalic-webfont.woff 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.
Status: NEW → ASSIGNED
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 https://thimble.webmaker.org/project/15677/remix 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+
Commit pushed to master at https://github.com/mozilla/thimble.webmaker.org

https://github.com/mozilla/thimble.webmaker.org/commit/56a8f6cfc5768b2cdff99d50cff09fee47bcb13c
Merge pull request #241 from Pomax/bug919636

tell codemirror where an error is, if the cursor is at 0/0
landed.
Status: ASSIGNED → RESOLVED
Closed: 11 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.

Attachment

General

Creator:
Created:
Updated:
Size: