I think there might be an issue with the onmouseover event on the label portion of a checkbox w/ label. I haven't had a chance to test on 5.0.1 yet, but in 4.8.4 the onmouseover does not fire on the label portion. Is this by design?
My workaround for this issue was to create separate label widgets and code the onmouseover on both the checkbox and label.
Sean
checkbox w/ label onmouseover event
-
- Profound User
- Posts: 76
- Joined: Fri Jan 11, 2013 6:11 pm
- First Name: Sean
- Last Name: Tyree
- Company Name: US HealthWorks
- State / Province: California
- Zip / Postal Code: 91355
- Country: United States
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: checkbox w/ label onmouseover event
I must admit that I don't know what the original intention was, here.
Under the covers, Profound UI will create two separate HTML objects, an <input> tag for the check box, and a <label> tag for the label. So if you wanted the 'onmouseover' to work on both, you'd have to enclose them both inside a <div> or similar and put the onmouseover on that div. Otherwise, it'd potentially fire twice (once when the user moves the mouse over the checkbox, and again when the user puts the mouse over the label)
I'd be worried about changing this as it might break compatibility with existing applications?
Your solution of putting out two separate widgets (one for the checkbox and one for the label) seems like it's a good way to do it. (I'm assuming that you don't mind the onmouseover potentially firing twice, it won't hurt anything in your particular application.)
Under the covers, Profound UI will create two separate HTML objects, an <input> tag for the check box, and a <label> tag for the label. So if you wanted the 'onmouseover' to work on both, you'd have to enclose them both inside a <div> or similar and put the onmouseover on that div. Otherwise, it'd potentially fire twice (once when the user moves the mouse over the checkbox, and again when the user puts the mouse over the label)
I'd be worried about changing this as it might break compatibility with existing applications?
Your solution of putting out two separate widgets (one for the checkbox and one for the label) seems like it's a good way to do it. (I'm assuming that you don't mind the onmouseover potentially firing twice, it won't hurt anything in your particular application.)
-
- Profound User
- Posts: 76
- Joined: Fri Jan 11, 2013 6:11 pm
- First Name: Sean
- Last Name: Tyree
- Company Name: US HealthWorks
- State / Province: California
- Zip / Postal Code: 91355
- Country: United States
- Contact:
Re: checkbox w/ label onmouseover event
Scott, since the onmouseover events are firing independantly, I do not have a problem with 2 widgets (I have the same code behind each of them anyway).
I can see why some applications would not want to fire on the label since it is the non-functional part of the widget.
Thanks for looking into this,
Sean
I can see why some applications would not want to fire on the label since it is the non-functional part of the widget.
Thanks for looking into this,
Sean
Who is online
Users browsing this forum: No registered users and 2 guests