Bug Tracker

Ticket #3085 (new enhancement)

Opened 2 months ago

Last modified 2 months ago

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

Reported by: ohkuma Assigned to: anonymous
Type: enhancement Priority: trivial
Milestone: 1.3 Component: core
Version: 1.2.3 Keywords: NetFront
Cc: Needs: Review

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)) ?

Attachments

Change History

Changed 2 months ago by flesler

  • priority changed from major to trivial
  • type changed from bug to enhancement

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

Note: See TracTickets for help on using tickets.