Closed Bug 88883 Opened 23 years ago Closed 23 years ago

Advanced Edit: Font element cannot contain events

Categories

(Core :: DOM: Editor, defect, P3)

x86
Other
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.4

People

(Reporter: rubydoo123, Assigned: cmanske)

References

Details

the Advanced edit for FONT needs to have event choices removed from events tab
Priority: -- → P3
Target Milestone: --- → mozilla1.0
No JS events at all? This is a new rule. Are there any other elements that
can't have any events?
We should simply disable the JS tab in this case.
Status: NEW → ASSIGNED
Target Milestone: mozilla1.0 → mozilla0.9.4
*** Bug 88945 has been marked as a duplicate of this bug. ***
*** Bug 88925 has been marked as a duplicate of this bug. ***
*** Bug 89448 has been marked as a duplicate of this bug. ***
Expanding this bug to cover all elements that shouldn't have JS events
Summary: Advanced Edit: Font element cannot contain events → Advanced Edit: Font, applet, isindex, and iframe elements cannot contain events
Fixed by adding a new signal string to tell us not to allow editing JS Events
Add this code to EdAEJSAttributes.js in the method BuildJSEAttributeNameList():

+      // Since we don't allow user-editable JS events yet (but we will soon)
+      // simply remove the JS tab to not allow adding JS events
+      if (attNames[0] == "noJSEvents")
+      {
+        var tab = document.getElementById("tabJSE");
+        if (tab)
+          tab.parentNode.removeChild(tab);
+
+        return;
+      }
... 
-  // Always add core JS events
+  // Always add core JS events unless we aborted above
(rest is the same as before)

In EdAEAttributes.js, add this to tell us what elements to not set events on:
+
+// Elements that don't have core JSEvents:
+gJSAttr.font =
+[
+
"noJSEvents"
+];
+
+gJSAttr.applet =
+[
+
"noJSEvents"
+];
+
+gJSAttr.isindex =
+[
+
"noJSEvents"
+];
+
+gJSAttr.iframe =
+[
+
"noJSEvents"
+];

 
Keywords: review
Whiteboard: FIX IN HAND, need r=, sr=
Hmm, that diff is confused by tab characters in the source. The new element
entries look like this using 2 spaces instead of tabs:

// Elements that don't have JSEvents:
gJSAttr.font =
[
  "noJSEvents"
];

gJSAttr.applet =
[
  "noJSEvents"
];

gJSAttr.isindex =
[
  "noJSEvents"
];

gJSAttr.iframe =
[
  "noJSEvents"
];

Keywords: review
Summary: Advanced Edit: Font, applet, isindex, and iframe elements cannot contain events → Advanced Edit: Font element cannot contain events
Whiteboard: FIX IN HAND, need r=, sr=
Fixed with other Advanced Editor dialog fixes last week.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verified on 8-30 Build
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.