The default bug view has changed. See this FAQ.

Bespin Embedded fails to load on Mobile Safari on iPhone 2G 3.1.2

RESOLVED INVALID

Status

Skywriter
Embedded
--
major
RESOLVED INVALID
7 years ago
6 years ago

People

(Reporter: Vitorio, Assigned: Kevin Dangoor)

Tracking

0.6.2
Other
Other

Details

(URL)

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7
Build Identifier: 

Bespin Embedded throws a JavaScript Error on Mobile Safari on iPhone 2G 3.1.2.

JavaScript Error on Line 38
https://bespin.mozilla...ded/BespinEmbedded.js
ReferenceError: Can't find variable: JSON

Text is also rendered in correctly and the component isn't editable.

Reproducible: Always

Steps to Reproduce:
1. Visit the Bespin Embedded sample.

Actual Results:  
Text is black and not editable.

JavaScript error is thrown.

Expected Results:  
Should work as it does in regular desktop Safari
(Reporter)

Comment 1

7 years ago
Created attachment 424436 [details]
broken rendering on Mobile Safari on iPhone 2G 3.1.2

Zoomed in so you can see the text better.
Component: General → Embedded
QA Contact: general → embedded
Version: unspecified → 0.6
(Reporter)

Comment 2

7 years ago
The "ReferenceError: Can't find variable: JSON" error is due to Mobile Safari not having a native JSON implementation.  Including e.g. json.org's json2.js before the BespinEmbedded.js makes it work (tested in 0.6.2).

Also attached a screenshot of what 0.6.2 looks like (after you add the JSON implementation) in the simulator (still renders text weirdly).
Version: 0.6 → 0.6.2
(Reporter)

Comment 3

7 years ago
Created attachment 435120 [details]
Bespin Embedded 0.6.2 in the Mobile Safari simulator
(Reporter)

Comment 4

7 years ago
After further debugging, the weird text rendering appears to be due to Mobile Safari (through OS 3.1.2) being roughly equivalent to Safari 3, except that it reports it supports canvas text rendering when it actually doesn't.

Including the canvas-text replacement library[1] (after the JSON replacement library) and forcing it to be used (along with providing a JS version of Lucida Console and forcing that to be used, since I don't have a TTF of Monaco), finally makes the canvas render properly;

[1] http://code.google.com/p/canvas-text/

Tapping on the canvas gives me a blinking cursor and brings up the virtual keyboard, but typing has no effect at this time.
(Reporter)

Comment 5

7 years ago
Created attachment 435359 [details]
Bespin Embedded 0.6.2 in the Mobile Safari simulator with working fonts and the virtual keyboard
Attachment #424436 - Attachment is obsolete: true
Attachment #435120 - Attachment is obsolete: true
(Reporter)

Updated

7 years ago
Duplicate of this bug: 543246
(Assignee)

Updated

7 years ago
Target Milestone: --- → 0.8
(Assignee)

Updated

7 years ago
Assignee: nobody → kdangoor
Severity: normal → major
(Assignee)

Comment 7

7 years ago
bumping to 0.8.1, because we need to get 0.8 out the door.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: 0.8 → 0.8.1
(Assignee)

Updated

7 years ago
Target Milestone: 0.8.1 → 0.9
(Assignee)

Comment 8

6 years ago
ACETRANSITION

The Skywriter project has merged with Ajax.org's Ace project (the full server part of which is their Cloud9 IDE project). Background on the change is here:

http://mozillalabs.com/skywriter/2011/01/18/mozilla-skywriter-has-been-merged-into-ace/

The bugs in the Skywriter product are not necessarily relevant for Ace and quite a bit of code has changed. For that reason, I'm closing all of these bugs. Problems that you have with Ace should be filed in the Ace issue tracker at GitHub:

https://github.com/ajaxorg/ace/issues
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.