Skip to content

Commit e2149c1

Browse files
hansonrhansonr
authored andcommitted
fix for FireFox 87 attr false means true
1 parent a8116ce commit e2149c1

File tree

7 files changed

+5
-4
lines changed

7 files changed

+5
-4
lines changed
17 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20210426142515
1+
20210427120017
17 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20210426142515
1+
20210427120017
17 Bytes
Binary file not shown.

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSComponentUI.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,6 +1120,7 @@ public void abstractButtonFocusHack() {
11201120
*/
11211121
protected final static String TRUE = "秘TRUE";
11221122
protected final static String FALSE = "秘FALSE";
1123+
protected final static String NULL = null;
11231124
/**
11241125
* for jQuery return
11251126
*/
@@ -2327,7 +2328,7 @@ protected void enableNode(DOMNode node, boolean b) {
23272328
if (node == null || isUIDisabled)
23282329
return;
23292330

2330-
DOMNode.setAttr(node, "disabled", (b ? FALSE : TRUE));
2331+
DOMNode.setAttr(node, "disabled", (b ? NULL : TRUE));
23312332
if (!b && inactiveForeground == colorUNKNOWN)
23322333
getDisabledColors(buttonNode == null ? getPropertyPrefix() : "Button");
23332334
if (jc.isOpaque()) {

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSRadioButtonUI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public boolean handleJSEvent(Object target, int eventType, Object jQueryEvent) {
9696
protected void setupButton(JToggleButton b, boolean doAll) {
9797
// actionNode, iconNode, textNode, centeringNode, buttonNode
9898
if (actionNode != null)
99-
DOMNode.setAttr(actionNode, "checked", b.isSelected() ? TRUE : FALSE);
99+
DOMNode.setAttr(actionNode, "checked", b.isSelected() ? TRUE : NULL);
100100
setCssFont(textNode, c.getFont());
101101
// TODO: not allowing radio/checkbox icons (custom buttons)
102102
setIconAndText("radio", (ImageIcon) null/* button.getIcon() */, button.getIconTextGap(), button.getText());

0 commit comments

Comments
 (0)