Re:A spreadsheet in fewer than 30 lines of JavaScript, no li...
by dakridge on Wednesday November 13, 2013 @01:41PM
(#6727348)
Just curious - shouldn't the events be attached to the parent table and delegated to the children inputs so you are not attaching the focus and blur events to each individual input? Similar to something like this: http://jsfiddle.net/W3Stf/
[ Parent
| on HN ]
Re:A spreadsheet in fewer than 30 lines of JavaScript, no li...
by ondras on Wednesday November 13, 2013 @02:19PM
(#6727660)
That is a cool improvement. The "focus" and "blur" events do not bubble, so I initially tried to evade event delegation - with respect to legacy event handling (attachEvent) that does not support the capture phase you used.