Skip to content

Instantly share code, notes, and snippets.

@dgerhardt
Last active December 20, 2015 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgerhardt/6194137 to your computer and use it in GitHub Desktop.
Save dgerhardt/6194137 to your computer and use it in GitHub Desktop.
dijit/CheckedMenuItem: disabled state no longer visible https://bugs.dojotoolkit.org/ticket/17371#ticket
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dijit 1.9 disabled CheckedMenuItem display bug</title>
<link href="http://ajax.googleapis.com/ajax/libs/dojo/1.9.1/dojo/resources/dojo.css" rel="stylesheet" />
<link href="http://ajax.googleapis.com/ajax/libs/dojo/1.9.1/dijit/themes/claro/claro.css" rel="stylesheet" />
</head>
<body class="claro">
<h1>Dijit 1.9 disabled CheckedMenuItem display bug</h1>
<div id="container"></div>
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.9.1/dojo/dojo.js" data-dojo-config="async: true"></script>
<script>
require(["dijit/form/DropDownButton", "dijit/Menu", "dijit/CheckedMenuItem"], function (DropDownButton, Menu, CheckedMenuItem) {
var button, menu, item1, item2, item3;
menu = new Menu();
item1 = new CheckedMenuItem({
label: "Item 1"
});
item2 = new CheckedMenuItem({
label: "Item 2",
disabled: true
});
item3 = new CheckedMenuItem({
label: "Item 3"
});
button = new DropDownButton({
label: "ComboButton",
dropDown: menu
});
menu.addChild(item1);
menu.addChild(item2);
menu.addChild(item3);
button.placeAt("container").startup();
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment