Hi Isomorphic,
please see this test case showing unexpected behaviour in FF26 Dev Mode (v9.1p_2014-04-09):
1st test case:
2nd test case:
Expected behaviour:
I realize the the last "shadow becomes smaller" might not be possible as there is no new MouseDownEvent, but the rest is a bug in my opinion.
Best regards,
Blama
please see this test case showing unexpected behaviour in FF26 Dev Mode (v9.1p_2014-04-09):
Code:
package com.smartgwt.sample.client;
import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.types.VerticalAlignment;
import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.Img;
import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.events.MouseDownEvent;
import com.smartgwt.client.widgets.events.MouseDownHandler;
import com.smartgwt.client.widgets.events.MouseOutEvent;
import com.smartgwt.client.widgets.events.MouseOutHandler;
import com.smartgwt.client.widgets.events.MouseOverEvent;
import com.smartgwt.client.widgets.events.MouseOverHandler;
import com.smartgwt.client.widgets.events.MouseUpEvent;
import com.smartgwt.client.widgets.events.MouseUpHandler;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
public class MyTest extends HLayout {
private static String ico = "[SKIN]/actions/accept.png";
// private static String ico = "[SKIN]/svgtest.svg";
private static String bigDesc = "headerheader";
private static String smallDesc = "foobar";
VLayout vL;
Label big;
Label small;
Img i;
public MyTest() {
super();
setPadding(1);
setMembersMargin(2);
setHeight(62);
setWidth(200);
setOverflow(Overflow.HIDDEN);
setBackgroundColor("white");
setShowShadow(true);
setShadowSoftness(4);
setShadowOffset(4);
setBorder("1px solid red");
i = new Img(ico, 60, 60);
big = new Label("<span style=\"font-size: 15px\">" + bigDesc + "</span>");
// big.setBackgroundColor("white");
big.setHeight(20);
big.setBorder("1px solid red");
small = new Label(smallDesc);
// small.setBackgroundColor("white");
small.setHeight(15);
small.setBorder("1px solid red");
vL = new VLayout(0);
vL.setPadding(0);
// vL.setWidth(40);
// vL.setHeight(40);
vL.setMembers(big, small);
vL.setOverflow(Overflow.HIDDEN);
vL.setAlign(VerticalAlignment.CENTER);
vL.setBorder("1px solid red");
setMembers(i, vL);
addMouseDownHandler(new MouseDownHandler() {
@Override
public void onMouseDown(MouseDownEvent event) {
setShadowOffset(2);
}
});
addMouseUpHandler(new MouseUpHandler() {
@Override
public void onMouseUp(MouseUpEvent event) {
setShadowOffset(4);
}
});
addMouseOverHandler(new MouseOverHandler() {
@Override
public void onMouseOver(MouseOverEvent event) {
setBackgroundColor("lightblue");
}
});
addMouseOutHandler(new MouseOutHandler() {
@Override
public void onMouseOut(MouseOutEvent event) {
setBackgroundColor("white");
setShadowOffset(4);
}
});
addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
SC.say("Click!");
}
});
}
}
- Click "New"
- Move over the Canvas (either Img or one of the Labels) -> Background is changed to light blue
- Left-Click without releasing -> Shadow becomes smaller
- Move inside the Canvas to another member -> Background is changed to white
- Release left mouse button -> No click is issued
- (It only get blue and issues the click when over the member where you pressed the mouse button)
2nd test case:
- Click "New"
- Move over the Canvas (either Img or one of the Labels) -> Background is changed to light blue
- Left-Click without releasing -> Shadow becomes smaller
- Move outside the Canvas -> Background is changed to white, Shadow becomes smaller
- Move to the same member inside the Canvas -> Background is changed to light blue, Shadow does not become smaller
- Release left mouse button -> Click is issued
- (It only gets blue and issues the click when over the member where you pressed the mouse button)
Expected behaviour:
- Click "New"
- Move over the Canvas (either Img or one of the Labels) -> Background is changed to light blue
- Left-Click without releasing -> Shadow becomes smaller
- Move inside the Canvas to another member (background stays light blue)
- Move outside the Canvas -> Background is changed to white, shadow becomes bigger
- Move anywhere inside the Canvas -> Background is changed to light blue, shadow becomes smaller
- Release left mouse button -> Click is issued
I realize the the last "shadow becomes smaller" might not be possible as there is no new MouseDownEvent, but the rest is a bug in my opinion.
Best regards,
Blama