6

I have noticed this bug when developing my flash application on a windows platform. If typing text in to a text box in a Flash swf running in Safari 5 browser on Windows then press backspace the browser will jump to the previous page in history rather than performing the function that backspace is supposed to - here is a link to another report of this apple bug -

http://www.ruelke.org/blog-entry-138.html

How can we work around this apple problem? cheers

undefined
  • 5,190
  • 11
  • 56
  • 90

4 Answers4

2

What wmode are you using? Try setting wmode to opaque. There are numerous keyboard input bugs when using wmode transparent.

Dean North
  • 3,741
  • 2
  • 29
  • 30
0

Have you tried with a nightly? If it is still broken you should file a bug at http://bugs.webkit.org that really is the best way to get bugs fixed.

olliej
  • 35,755
  • 9
  • 58
  • 55
0

What version of the flash player are you targeting? I've noticed that keyboard focus is treated differently when publishing from CS5.

Zevan
  • 10,097
  • 3
  • 31
  • 48
0

Can you use JavaScript to hi-jack the key event before safari gets handles it. I know on yahoo mail (rather annoyingly) cntrl-w closes a mail tab, not the the actual tab.

Something like this for the keypress event:

function preventBackspace(e) {
    var evt = e || window.event;
    if (evt) {
        var keyCode = evt.charCode || evt.keyCode;
        if (keyCode === 8) {
            if (evt.preventDefault) {
                evt.preventDefault();
            } else {
                evt.returnValue = false;
            }
        }
    }
}

taken from here

Community
  • 1
  • 1
Ross
  • 14,266
  • 12
  • 60
  • 91
  • This doesn't work. I just encountered this bug and tried to kill the event propagation. It gets killed at the component level and isn't triggered at the app level (as well it shouldn't be) but does get through to Safari. Setting wmode="opaque" solves the issue, though. – Robusto May 24 '11 at 15:24