FF2: Cursor not visible in text fields

I’m used to dealing with bugs in legacy browsers, just not ones in Firefox. A strange bug in some releases of FF2 causes the cursor to disappear in text fields and textareas. A general fix was to specify overflow: auto for the fields. However, in some stubborn cases (inside the div-complexity of a modal box), this didn’t help.

I ended up using Jquery to inject a wrapper and some CSS to fix the issue.

$('.modal input[type=text], .modal input[type=password]')
.live('focus', function(){
if ($(this).parent().hasClass('ff2fix') == false) {
$(this).wrap('<div class="ff2fix" style="float: left; width: '
+ $(this).outerWidth() + 'px; height: '
+ $(this).outerHeight() + 'px;"></div>');
$(this).css('position', 'fixed');
}
$(this).focus();
return true;
});
Ilya
  • Home
  • About
  • Preferences


RSS

March 2010

Mon

Tue

Wed

Thu

Fri

Sat

Sun

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

Feb   Apr

Beared souls

caught together