Last modified: 2013-10-29 07:39:29 UTC
The Narayam input method doesn't take effect in a lot of input fields, including but not limited to: * Search box * edit summary * real name, signature on prefs * reason box on deletion These appear to have no type attribute, which seems to cause them not to match any of these selectors: $.narayam.addInputs( 'input[type=text], input[type=search], input[type=], textarea' ); Changing 'input[type=]' to 'input' fixes them, but would presumably also try to apply to checkboxes, radios, etc. Either needs a selector to match things with *no* type attribute, or just hit them all and let the setup function worry about changing them. More generally though, I suspect that the current bindings will fail to engage when inputs or textareas are added later, for instance by a popup dialog. Instead of binding events on every individual input field, it might be wise to do some kind of global .live() check on focus/blur to activate the keyboard bindings on a given field.
I was working at you mentioned boxes before! You can check its original working at Malayalam Wikipedia: http://ml.wikipedia.org/ (Not recent version) I have to check to find why it is not working now.
(In reply to comment #0) > Changing 'input[type=]' to 'input' fixes them, but would presumably also try to > apply to checkboxes, radios, etc. Either needs a selector to match things with > *no* type attribute, or just hit them all and let the setup function worry > about changing them. > Be very careful about cross-browser compatibility here. Edge cases such as matching type-less inputs with input[type=] or input:not([type]) or whatever seem to work differently in different browsers. > More generally though, I suspect that the current bindings will fail to engage > when inputs or textareas are added later, for instance by a popup dialog. > Instead of binding events on every individual input field, it might be wise to > do some kind of global .live() check on focus/blur to activate the keyboard > bindings on a given field. Yeah, I thought about this, but never got to it. Because existence isn't an event that you can live(), I think you would have to use delegate() on the body or something.
Sorry, my previous comment typed wrongly. I mean, It was working before at those boxes. I think something out of Narayam causes this issue, any jQuery update or anything else in Mediawiki? Vibber, see, it is working fine at Malayalam Wikipedia (http://ml.wikipedia.org)?
There seem to be some differences with $wgHtml5 on vs off; on wikipedia sites it's still off but it's on by default on new installations. Both seem to have jquery 1.4.4 currently, so the native jquery behavior shouldn't be different... I think it's actually the 'type="text"' attribute being dropped in $wgHtml5 mode.
What about putting this line too? $.narayam.addInputs($('input').not('[type]')); // All inputs that don't have type attribute But I have not tested it because current jQuery that mediawiki use, v1.6.2, have a bug that prevent Narayam from working. I want to discuss about it, probably better to discuss on IRC or another bug report. Anyway giving a line. Please see this bug of jQuery: http://bugs.jquery.com/ticket/9301 especially this comment: http://bugs.jquery.com/ticket/9301#comment:20 Should we make all data key names to 'camelCase' or just wait for fixed jQuery?
(In reply to comment #5) > What about putting this line too? > > $.narayam.addInputs($('input').not('[type]')); // All inputs that don't have > type attribute > > > But I have not tested it because current jQuery that mediawiki use, v1.6.2, > have a bug that prevent Narayam from working. > > I want to discuss about it, probably better to discuss on IRC or another bug > report. Anyway giving a line. > > Please see this bug of jQuery: http://bugs.jquery.com/ticket/9301 > especially this comment: http://bugs.jquery.com/ticket/9301#comment:20 > > Should we make all data key names to 'camelCase' or just wait for fixed jQuery? Since it's easy to work around the bug and make all key names camelcase, you might as well just do that.
Unfortunately my above line $.narayam.addInputs($('input').not('[type]')); not worked. Then I tried with jQuery's proprietary :text selector and found working (no performance boost). So used it in code and made a commit (r92347, forgot to mention this bug id on commit message) As Brion noted out it was a problem that the extension has no effect on input fields added to DOM later. So I tried with jQuery's live() function, found it working :) I have installed changed extension on my testwiki: http://testwiki.junaidpv.in the site has HotCat installed, it is working on HotCat's fields, you may try it. My code diff is: https://gist.github.com/1087017 Should I commit the change or any suggestions?
By r92347 and r92747 Narayam can act on all text input fields including fields added later to DOM.