Bug Tracker

Opened 11 years ago

Closed 9 years ago

#3085 closed enhancement (wontfix)

In NetFront Browser v3.4SP16 UTF-8 version, most of jQuery's functions are not run

Reported by: ohkuma Owned by:
Priority: trivial Milestone: 1.3
Component: core Version: 1.2.3
Keywords: NetFront Cc:
Blocked by: Blocking:

Description

cause:
The following (L1369, jquery-1.2.3.js):

var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
		"(?:[\\w*_-]|\\\\.)" :
		"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
	quickChild = new RegExp("^>\\s*(" + chars + "+)"),
	quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),
	quickClass = new RegExp("^([#.]?)(" + chars + "*)");

Script seems to stop by treating Unicode at RegExp().

workaround:

 jQuery.browser = {
-	version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1],
+	version: (window.netfront == null) ? (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1] : window.netfront.version(),
 	safari: /webkit/.test( userAgent ),
 	opera: /opera/.test( userAgent ),
 	msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
-	mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
+	mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent ),
+	netfront: window.netfront != null || /netfront/.test( userAgent )
 };

...

-var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
+var chars = ((jQuery.browser.safari && parseInt(jQuery.browser.version) < 417) || (jQuery.browser.netfront && parseFloat(jQuery.browser.version) <= 3.4)) ?

Change History (2)

comment:1 Changed 11 years ago by flesler

Priority: majortrivial
Type: bugenhancement

As you might know, NetFront isn't supported by jQuery. You say that with those single changes, then everything works on NetFront ?

Please make a checkout/export from the svn repository. You need to run a make to generate a jQuery deploy:

make jquery

Then go to /dist/jquery.js and add the modifications you mention. Now run /test/ on your NetFront.

Let me know if all the tests pass. Thanks

comment:2 Changed 9 years ago by snover

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.