Bug Tracker

Modify

Ticket #3085 (closed enhancement: wontfix)

Opened 5 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 5 years 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

comment:2 Changed 3 years ago by snover

  • Status changed from new to closed
  • Resolution set to wontfix

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.