0

See the fiddle below. Both focus events will fire in IE and only the one for the input will work in webkit browsers and firefox.

I require .focus() on layers because in my page there are controls that are enabled and disabled depending on whether the user clicks on the control bar or the white space below which is a layer. Using something like .click() won't cut it since the event fires every time I click on any link/text over said white space, strangely also only in non IE browsers.

http://jsfiddle.net/X2Pxw/11/

LaserBeak
  • 3,257
  • 10
  • 43
  • 73

2 Answers2

0

Based on the best rated answer here a div cannot get focus unless it has a tabindex attribute. As far as I understand, this contradicts HTML 4.01 but works...

Community
  • 1
  • 1
dezso
  • 2,894
  • 23
  • 29
0

I have modified the jQuery code. It may do what you want to do actually.

http://jsfiddle.net/X2Pxw/20/

Imdad
  • 5,942
  • 4
  • 33
  • 53