Skip to content
laughinghan edited this page May 30, 2012 · 1 revision

The textarea needs its own span because

  • to be focusable,
    • it has to be "visible",
      • which means it must have nonzero width and height,
  • but we don't want it to affect layout of the math,
    • so we want to take it out of normal flow by giving it position:absolute,
  • but we want it in corner of the math editable because many browsers will scroll to the x,y position of the focusee on focus,
    • and we can't be sure the root math element is the containing block,
    • so we have a span that's position:relative and thus will be the containing block
      • and that's in normal flow and thus is in the corner of the math editable
Clone this wiki locally