Skip to content

Commit 9fb4aed

Browse files
committed
Speed up !ColorPalette creation time:
(1) Put ondijitclick handler on the TABLE node rather than each TD. (2) Use :hover and :active CSS pseudo-selectors rather than setting dijitPaletteCellHover / dijitPaletteCellActive. Needed to increase selectivity of dijitPaletteCellSelected selector so it wins over dijitPaletteCell:hover selector. (Hovering the selected cell should have no effect, since clicking that cell has no effect.) Note that hover state is no longer shown on IE6, but works on IE7+. Could add code to make IE work (monitoring mouseout, mouseover, mousedown, mouseup on this.gridNode) but I don't think it's worth the code bloat. Fixes #1852 !strict.
1 parent 78f7026 commit 9fb4aed

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drawing/resources/GreekPalette.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
.dojoxEntityPaletteCell {
1515
/* individual cell of the drop down */
1616
border: 1px dotted gray;
17-
width: 20px; /* todo: don't hardcode width/height; it's neither nececessary nor a11y safe */
17+
width: 20px; /* todo: don't hardcode width/height; it's neither necessary nor a11y safe */
1818
line-height: 18px;
1919
overflow: hidden;
2020
z-index: 10;
2121
text-align: center;
2222
}
2323

24-
.dojoxEntityPaletteCellHover, .dojoxEntityPaletteCellActive, .dojoxEntityPaletteCellFocused {
24+
.dojoxEntityPaletteCell:hover, .dojoxEntityPaletteCell:active, .dojoxEntityPaletteCell:focus {
2525
width: 18px;
26-
line-height: 16px;
26+
line-height: 16px;
2727
overflow: hidden;
2828
cursor: default;
2929
border:1px dashed #000;

editor/plugins/resources/css/InsertEntity.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222
.dojoxEntityPaletteCell {
2323
/* individual cell of the drop down */
2424
border: 1px dotted gray;
25-
width: 20px; /* todo: don't hardcode width/height; it's neither nececessary nor a11y safe */
25+
width: 20px; /* todo: don't hardcode width/height; it's neither necessary nor a11y safe */
2626
line-height: 18px;
2727
overflow: hidden;
2828
z-index: 10;
2929
text-align: center;
3030
}
3131

32-
.dojoxEntityPaletteCellHover, .dojoxEntityPaletteCellActive, .dojoxEntityPaletteCellFocused {
32+
.dojoxEntityPaletteCell:hover, .dojoxEntityPaletteCell:active, .dojoxEntityPaletteCell:focus {
3333
width: 18px;
34-
line-height: 16px;
34+
line-height: 16px;
3535
overflow: hidden;
3636
cursor: default;
3737
border:1px dashed #000;

0 commit comments

Comments
 (0)