Double-click triggering edit mode redundantly

Ticket

+commit
 
Double-click triggering edit mode when already in edit mode.

 

I think the best thing here may be a refactor.  Right now what happens is a separate event is set up for each slot to trigger double click editing.  I think what should happen is that there should be one event for the whole page, and that when the event is called, we navigate outward from the location of the double-click event until we find a tag or attributes that we know what to do with.  If it's an edit box, then we discard, if it's a slot id, then we edit, etc.

 

Go to WQL+Samples open up the first inclusion - "search for exact name" - and edit it. Double-click on anything to select it and start typing - in a second or so, it will have reloaded the original, reverting from whatever you had changed.

 

Is there a ticket already for this refactor (if so, what's it called), or should we rename this? Also, am I correct in assuming that this fix would also address the unwanted behavior of an outer card going into edit mode when double-clicking in an inner card's text? (Tom estimates he's wasted an hour of work the past few days on this.) Example: try editing an inclusion on http://test.dwagn.org/wagn/double_click_testing and double-clicking in the edit box. In fact the behavior described above seems to have been fixed, and now instead we're getting this (in Search and PlainText cards, but not Basic or Pointer). I'm pretty sure there' more nuance to when this happens or doesn't. Let me know if you need it more worked out. --John Abbe


I'll try to organize tickets around this soon -- several confounded issues. Moving to Rails 3, moving everything into JQuery, adding javascript testing, making double-click-to-edit optional, and fixing these double-clicks are all wrapped up together. But the short answer is, yes, we'll be trying to fix pretty much all the double-click related issues.

 

The most pressing thing on a design level may be to make sure we know how we want turning on/off double clicks to work.

  --Ethan McCutchen.....Thu Mar 31 17:40:33 -0700 2011


tested examples listed. appears to be working fine. closing.

  --Ethan McCutchen.....Wed Jan 25 18:52:06 -0800 2012