[wp-trac] [WordPress Trac] #13615: Confusing behavior adding items to nonexistent menu

WordPress Trac wp-trac at lists.automattic.com
Sat May 29 19:34:02 UTC 2010


#13615: Confusing behavior adding items to nonexistent menu
--------------------------+-------------------------------------------------
 Reporter:  filosofo      |       Owner:  markjaquith
     Type:  defect (bug)  |      Status:  accepted   
 Priority:  normal        |   Milestone:  3.0        
Component:  Menus         |     Version:  3.0        
 Severity:  normal        |    Keywords:  has-patch  
--------------------------+-------------------------------------------------

Comment(by markjaquith):

 Replying to [comment:2 filosofo]:
 > As an aside, I'm really curious why you'd change the line in my patch
 from
 >
 > `if ( document.getElementById('menu-to-edit') )`
 >
 > to
 >
 > `if ( 0 != $('#menu-to-edit').length )`
 >
 > Would you please explain?

 It's shorter, and because jQuery is WP's JS library and I like to use it
 wherever possible. It tends to reduce the incidence of browser-specific JS
 bugs.

 > I think it deserves a slight non-JS modification, in that the submit
 buttons are additionally disabled, otherwise clicking those would cause a
 page refresh and that's odd.

 That would be a lot of code... wouldn't you have to add it to each of the
 buttons? I'm going to commit what I have, since what you propose could be
 added on.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13615#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list