Last modified: 2012-08-30 21:11:27 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T41098, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39098 - Radiobuttons not working properly when using show on select
Radiobuttons not working properly when using show on select
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-07 12:57 UTC by Toni Hermoso Pulido
Modified: 2012-08-30 21:11 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Toni Hermoso Pulido 2012-08-07 12:57:38 UTC
Hi,

when using radiobuttons (dropdown is fine), I noticed that hidden divs do not show at the first click (at the corresponding associated radiobuttion, of course).

This seems because hidden divs do not seem to be set to 'display:none' but only to 'opacity:0' from the very beginning.

As a solution I added this bit of code to showDiv function in SemanticForms.js

if ( jQuery(this).css('opacity') == 0 ) {
   jQuery(this).css('opacity', 1);
}

but I guess this might be solved from the beginning, assigning 'display:none' to associated radiobutton div, and not only 'opacity:0'. However, I haven't found the involved function yet.

Using 
Semantic Forms (Version 2.4.2)
MediaWiki 	1.19.1
Firefox 14.0.1 -> Seems to be the same for Chrome.
Comment 1 Yaron Koren 2012-08-07 13:37:42 UTC
Hi,

Sorry, I don't understand the issue - you need to click on a radiobutton twice for the div to appear? Or do you mean that the div doesn't appear when the page first loads?
Comment 2 Toni Hermoso Pulido 2012-08-07 13:40:51 UTC
Hi,

it's your first statement: basically becase the divs which are not intended to be shown are not hidden with 'display:none' (only opacity:0)
Comment 3 Yaron Koren 2012-08-30 21:11:27 UTC
Hi - okay, I figured out the issue (it was actually a small Javascript bug), and it's now fixed in Git. Thanks for letting me know about the problem.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links