MacOS X, Gecko based browsers and alt+s problem

Started by Chogata, September 08, 2010, 08:13:58 AM

Previous topic - Next topic

Chogata

Hello,

I'm using a forum that runs on this script (2.0 RC3 with polish language, tried to link it, but the script says I'm not allowed). I'm not the owner nor admin, so I cannot check much.

I am a polish user and I write in polish. I use polish programmer keyboard layout on Mac OS X (10.5.x). And the combination alt+s should give me letter 'ś'. And it does, on Safari, Opera, Google Chrome. But on Gecko based browsers (Camino and Firefox, latest versions, 2.0.4 and 3.6.9 respectively) alt+s submits my post instead.

The funny part is, when I write a post (in a Gecko browser), there is this hint below the editor window, which says: "shortcuts: hit shift+alt+s to submit/post or shift+alt+p to preview". And I'm NOT pressing shift (nor do I have caps lock on nor any other weird key), only alt+s and it does the posting.
(Side note: alt+shift+s wouldn't be good either, because they give the big letter 'Ś', but since this letter is very rare, I could live with it.)

When I write in a non-Gecko browser, alt+s gives me my letter, and the hint says it shouldn't because it goes like this: "shortcuts: hit alt+s to submit/post or alt+p to preview" on such a browser ;)

I could, of course, use this forum with Safari or something, but I really like Camino and would rather be using my favorite browser :) And I think that (at least on a Mac) alt+ctrl+some letter would be much more sensible combo.

OK, the troublesome letters in the above were copied and pasted from TextEdit, now I'll just try to press the magic combination:

Kindred

this is a problem with the browser, not with SMF...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Oya


Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Oya

firefox also gets a different shortcut text for this reason

Chogata

Quote from: Kindred on September 08, 2010, 11:27:23 AM
this is a problem with the browser, not with SMF...

Well, I cannot 100% agree.

Normally, alt+s just writes a polish letter. It is NOT a built-in shortcut on Firefox, Camino (Gecko based browsers in general). It's part of the code of SMF. So - SMF is the reason that I cannot write a polish letter 'ś'. I can write it on any other forum engine, on any other site.

Maybe (I'm not convinced about it) the problem exists because Gecko engine (on Mac) is somehow faulty. But it's popular and it shouldn't be so that people are unable to write in this browser. If making these shortcuts work on every (living, means developed and regularly updated) browser is impossible, users should be able to switch them off in their profiles. "Sorry, use another browser" is not a professional answer ;)

Chogata

OK, I got too impatient to wait and installed myself a copy of this forum script on my server.

file: Themes/default/scripts/editor.js, beginning at line 1168:

smc_Editor.prototype.registerDefaultShortcuts = function()
{
    if (is_ff)
    {
        this.registerShortcut('b', 'ctrl', 'b');
        this.registerShortcut('u', 'ctrl', 'u');
        this.registerShortcut('i', 'ctrl', 'i');
        this.registerShortcut('p', 'alt', 'preview');
        this.registerShortcut('s', 'alt', 'submit');
    }
}


and file: Themes/default/scripts/script.js, line 19

var is_ff = (ua.indexOf('firefox') != -1 || ua.indexOf('iceweasel') != -1 || ua.indexOf('icecat') != -1 || ua.indexOf('shiretoko') != -1 || ua.indexOf('minefield') != -1) && !is_opera;

So, translating from geek to english: if your browser is Firefox or similar, you get some nice shortcuts for some functions, one of them beeing: if you press alt and s, you'll send your post.

Well, that's nice, but:

1) Why the hint on Firefox or similar browser says "hit shift+alt+s to submit"? That's clearly not the case. OK, typo error, can be corrected.
Why is this hint even visible on non-Firefox-ish browsers, when it doesn't work there?

2) IMPORTANT: alt + s is a combination to get a local letter on MacOS X in some keyboard layouts. And on Mac BOTH alts acts EXACTLY the same! There is no "left alt" and "right alt" line on Windows. Yes, the hardware nowadays differentiates between the keys, has to ('cos you can install Windows on a Mac), but MacOS X doesn't! With such a shortcut SMF cannot be used with some keyboard layouts on MacOS X.
And there is a simple solution to that problem: customization (on user profile level). Think about it, guys :D

Kindred

hmmm...

Well, I suppose that my first thought (get a real computer) ;) isn't really helpful... (just kidding, btw)

I am not sure what we can do about this... the shortcut alt-s is actually fairly standard for forums, as far as I know
I believe that the shift-alt-s text was added when firrefox originally attempted to use alt-s for a history shortcut (which was later backed out)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Chogata

Fairly standard? Well ... I'm using about dozen of forums on at least 3 different engines (maybe more, don't have time to check) and until I stumbled on SMF, I've never seen such a shortcut.

Kindred

phpbb, vbulletin and ipb all use alt-s as the "submit" quick key. since they (and we) do, I suspect that the other forums also do...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Chogata

I use forums on phpbb version 2 and 3. Never had problem with alt+s there.

Kindred

well, according to the phpbb site, alt+s = submit shortcut.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Joshua Dickerson

That is certainly a dilemma. Adding the ability to change the shortcuts to something else definitely seems like a mod. Adding the ability to turn it on/off seems like a feature and one which I think would help anyone having issues. Although, this is the first time I've heard of this issue... granted I don't read/write Polish.

If another developer agrees, I think it makes sense to track.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

emanuele

I feel there are already situatins where the shortcut is changed according to the browser...could be this another one?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Joshua Dickerson

It already changes due to the browser, but we would need a way to disable it entirely.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Arantor

I wonder how relevant this is with the new editor.

Advertisement: