Open Bug 100825 Opened 23 years ago Updated 18 days ago

Subscript and Superscript combine in Format >Text Style pulldown menu

Categories

(Core :: DOM: Editor, defect)

defect

Tracking

()

Future

People

(Reporter: TucsonTester2, Unassigned)

References

()

Details

Attachments

(2 files, 2 obsolete files)

Product: Browser and Composer

Component: Composer

Platform: PC  

Operating System: Windows 95 - OSR1 

Build ID:  2001091303

URL: Not Applicable  

Desciption:
I dont know too much about superscript or subscript,but i didn't think you 
could use a combination of both at the same time.  Is this a bug or a new 
feature?--I checked in 4.7 and you can't do this. In 4.7 it has to be one or 
the other. But in this version if you select both in the Format >Text Style 
pulldown menu it will make the text smaller and it will be slightly lower and 
higher than normal text.

Reproducibility: Every time 

Steps to Reproduce: 
1.  Open a new blank page to edit in Composer

2.  Type in "NORM".

3.  Tap the spacebar twice, type in "SUPER".

4.  Tap the spacebar twice, type in "SUB".

5.  Tap the spacebar twice, type in "BOTH".

6.  Highlight "SUPER"

7.  At the top click on FORMAT, select TEXT STYLE, then click on SUPERSCRIPT.
(This will place a checkmark next to the superscript selection in the Text 
Style menu, and make "SUPER" smaller and raised up)

8.  Highlight "SUB"

9.  At the top click on FORMAT, select TEXT STYLE, then click on SUBSCRIPT.
(This will place a checkmark next to the superscript selection in the Text 
Style menu, and make "SUB" smaller and dropped down)

10.  Highlight "BOTH"

11.  At the top click on FORMAT, select TEXT STYLE, then click on SUBSCRIPT.
(There will now be a checkmark next to the superscript and the subscript 
selection in the Text Style menu, and will make "BOTH" smaller 
than "NORM", "SUPER",and "SUB", and "BOTH will be positioned between raised and 
dropped.)  
NOTE:  I have also tried selecting subscript first, and than selecting 
superscript, and have gotten the same end result.

Actual Results: 
HTML Source Tab:
<html>
<head>
</head>
<body>
NORMAL &nbsp;<sup>SUPER</sup> &nbsp;<sub>SUB</sub> 
&nbsp;<sub><sup>BOTH</sup></sub>
</body>
</html>

Expected Results: 
I would expect that if you selected subscript it would automatically cancel out 
your previous superscipt selection.  It is possible to de-select any previous 
selections and take out the checkmark where it was no longer needed.  However, 
I don't know of any type of documentation that require a hybrid-combination of 
both superscript and subscript.  So this would just require way too many mouse 
clicks for someone who just changed their mind, and wanted subscript instead of 
superscript.
This bug is also occurring on Windows 95 - OSR1.5.
Bug 100825 is also occurring on Windows 95 - OSR2.
Confirmed on Win 2k using QA build 20011001, Win 98 using QA build 20010927, and
Mac OSX using Mozilla build 20010930. 
Status: UNCONFIRMED → NEW
Ever confirmed: true
-->cmanske
is this a dup?
Assignee: syd → cmanske
We made superscript and subsctipt mutually exclusive in 4.7 as a convenience, 
since obviously it doesn't make sense to have both, but I don't think it's 
technically invalid HTML. If we want to enforce this again, it would have to be 
done in rules code.
Assignee: cmanske → jfrancis
I dOnT gEt It WhAtS tHe PrObLeM?

oh, ok.
Status: NEW → ASSIGNED
Whiteboard: EDITORBASE 3 days
Target Milestone: --- → mozilla1.0
Whiteboard: EDITORBASE 3 days → EDITORBASE; 3 days
Component: Editor: Composer → Editor: Core
Whiteboard: EDITORBASE; 3 days → EDITORBASE-; 3 days
Joe: Isn't this simply a matter of calling RemoveStyle("sup") whenever we set
"sub" and vice versa? That shouldn't be too hard, no?
Or maybe the simple fix is to do this in JS?
Assignee: jfrancis → cmanske
Status: ASSIGNED → NEW
Whiteboard: EDITORBASE-; 3 days
Target Milestone: mozilla1.0 → mozilla0.9.8
Attached patch Fix. (obsolete) — Splinter Review
Detect "sup" and "sub" in command code and remove opposite when setting style.
Status: NEW → ASSIGNED
Keywords: patch, review
OS: Windows 95 → All
Hardware: PC → All
Whiteboard: FIX IN HAND, need r=,sr=
Comment on attachment 63849 [details] [diff] [review]
Fix.

r=jfrancis.  Thanks Charlie!
Attachment #63849 - Flags: review+
checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Keywords: patch, review
Resolution: --- → FIXED
Whiteboard: FIX IN HAND, need r=,sr=
I am still seeing this problem on Win 2k and Mac OSX both using trunk build 01-24.

I am reopening this bug.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Moving to mozilla1.1
Status: REOPENED → ASSIGNED
Target Milestone: mozilla0.9.8 → mozilla1.1
Attached patch patch v2Splinter Review
doh!
Attachment #63849 - Attachment is obsolete: true
Keywords: nsbeta1, patch, review
Whiteboard: FIX IN HAND, need r=,sr=
Comment on attachment 91420 [details] [diff] [review]
patch v2

r=jfrancis
Attachment #91420 - Flags: review+
Whiteboard: FIX IN HAND, need r=,sr= → FIX IN HAND, need sr=
Comment on attachment 91420 [details] [diff] [review]
patch v2

sr=kin@netscape.com

Side note: I thought we were trying to get rid of all AssignWithConversion()
calls in editor code?
Attachment #91420 - Flags: superreview+
Whiteboard: FIX IN HAND, need sr= → FIX IN HAND
Comment on attachment 91420 [details] [diff] [review]
patch v2

a=asa (on behalf of drivers) for checkin to 1.1
Attachment #91420 - Flags: approval+
Checked into 1.1 trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago22 years ago
Keywords: patch, review
Resolution: --- → FIXED
Whiteboard: FIX IN HAND
i think this is still a problem, when using 2003.04.10 comm bits.

1. enter some text and select it.
2. select Format - Text Style - Superscript.
3. select Format - Text Style -Subscript.

results: the formatted text appears subscripted, but the source still applies
both tags:

<body>
<sub><sup>some text</sup></sub> and no formatting<br>
</body>

if i reverse steps 2 and 3, the formatted text doesn't even look superscripted
--it's smaller, but its height is somewhere in btwn. sample source:

<body>
and here is <sup><sub>some text</sub></sup> again<br>
</body>

reopening, and assigning to default owner (but reassign as needed).
Status: RESOLVED → REOPENED
QA Contact: sujay → sairuh
Resolution: FIXED → ---
over to joe this time, really.
Assignee: cmanske → jfrancis
Status: REOPENED → NEW
Should this really be a bug? Super/Subscripts should be allowed to have
superscript and subscript content shouldn't they?

  x<sup>y<sub>0</sub></sup>
adt: nsbeta1-
Keywords: nsbeta1nsbeta1-
retargeting
Target Milestone: mozilla1.1alpha → Future
Attached patch Final part of fix (obsolete) — Splinter Review
The existing code removed the applied sup/sub style, instead of the reverse
sub/sup style. While I was fixing this I noticed that the code used unicode
atoms; they have since changed to UTF-8 so I rewrote the atom handling code.
Attachment #138876 - Flags: review?(daniel)
Comment on attachment 138876 [details] [diff] [review]
Final part of fix

Does it really make sense to have SetTextProperty if no one else uses it?
Attachment #138876 - Flags: superreview?(sspitzer)
Also used jst's new EmptyString().
Assignee: mozeditor → neil.parkwaycc.co.uk
Attachment #138876 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #140257 - Flags: superreview?(alecf)
Attachment #140257 - Flags: review?(daniel)
Comment on attachment 140257 [details] [diff] [review]
Inlined at brade's request

looks good, its just too bad you have to get both atoms first.. but sr=alecf
assuming glazman is ok with it... I wonder how much other stuff there is like
this to clean up in composer...
Attachment #140257 - Flags: superreview?(alecf) → superreview+
This is not a bug.  Subscripts on superscripts and superscripts on subscripts
appear in mathematical formulas all the time.
Suggest invalid.
QA Contact: bugzilla → editor
Severity: normal → S3

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: neil → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: