Closed
Bug 77780
Opened 25 years ago
Closed 25 years ago
Text style not removed after highlighting from right to left
Categories
(Core :: DOM: Editor, defect)
Tracking
()
VERIFIED
WORKSFORME
People
(Reporter: nbaca, Assigned: mozeditor)
Details
Build 2001-04-25-08: Mac 9.04
Overview: I get into a state where removing a text style does not work using the
buttons on the formatting toolbar.
Steps to reproduce:
1. Open Composer
2. Type two lines of text
Bold
Italic
3. Highlight "Bold" and click on the "B" to apply the bold style
4. Highlight "Italic" and click on the "I" to apply the italic style
5. Click outside of the text area so No text is highlighted
6. Highlight "Italic" starting from right to left. The direction is very
important, don't go from left to right.
7. Select the "I" to remove the italic style
Actual Results: The style is not removed and the "I" button does not appear
highlighted so it appears that it is not recognizing the italic style that has
already been applied. If I click the "I" button two more times then it starts to
work.
If you have difficulty reproducing then try "bold and underline" instead. Then
after step 4 just highlight the underline text without clicking outside of the area.
Expected Results: Removing text styles using the Formatting toolbar should work
no matter what order is used to highlight the text.
| Reporter | ||
Comment 1•25 years ago
|
||
I don't see the same problem on Windows ME (build 2001-04-26-04).
I'm having problems reproducing this on mac, windows and linux.
I can see something similar to what you describe if you had:
line1 <--- This word is bold
line2 <--- This word is italic
<--- Blank line
and then clicked and dragged right to left in such a manner that the selection
actually included the blank line. In that case the Italics button is expected to
be unset because the selection has a mixed state of italic (the word "line1")
and non-italic (the blank line). Pressing it in this situation while in this
unset state would make the word "italic" and the blank line italic, pressing it
again would then make them both un-italic ... which is expected behavior.
Assignee: beppe → jfrancis
| Assignee | ||
Comment 3•25 years ago
|
||
this is tricky. on the one hand, i could make the GetInlineStyle functions try
to be smart, and say that things are italic if the non-italic part of the
selection only includes br's and perhaps empty structure (like an empty div or
something). But this leads to other problems: imagine selection all of the
following:
italic line
(blank)
(blank)
another italic line
If you select all that and the italic button lights, then what will you expect
if you click on one of the blank lines and type?
cc'ing folks who know more about ui than I for feedback.
Do we need tri-state toolbar buttons to show italic, not-italic, and mixed
states?
Comment 5•25 years ago
|
||
I don't think we want to do tri-state. After thinking a lot about it, I think
they are mostly confusing. The rule we settled on, which is mostly like other
word processor programs (not identical, but more consistent) is to show "set"
state only when attributed text is *entirely* witin the selection.
I "understand" the problems with the "end of line" effects in the examples.
To me, the bottom line is this: If the state button is Set, typing should show
that attribute in new text; if not set, it should not. Also, if set, clicking
on it should clear the attribute in the selection; if it is not set, clicking
on it should set the attribute on the selection.
In the case of
"italic
italic"
If use places caret on blank line, and button show "set" then they should
expect text to be italic. I can live with that.
We can probably live with subtle differences in whether or not a button looks
set because of direction-dependencies, although I agree there should be any
difference.
| Assignee | ||
Comment 6•25 years ago
|
||
Note that all of this would be more obvious to the user if we would show some
selection highlighting for selected br's. This would require selection to do
some drawing outside of the frame for br's (which are zero width). At least then
the user could determine through expirementation that the trailing br was outside
of the italic tag.
| Reporter | ||
Comment 7•25 years ago
|
||
Build 2001-05-01-04: Mac 9.04
I'm able to reproduce what I originally reported. I type three lines of text:
bold <-- this word is bold
italic <-- this word is italic
underline <-- this word is underlined
I only select the "italic" word starting from right to left, so I don't think
I'm doing a multi-select. I click on the Italic button and nothing happens.
| Assignee | ||
Comment 8•25 years ago
|
||
it's still the same issue. You can't tell if the br is selected. You also can't
tell if the br is inside or outside the italics.
Comment 9•25 years ago
|
||
I can't reproduce this on win98 using hte build from 2 May 2001, I opened a new
composer window, entered the two lines of text, then went back to the first line
and highlighted the text from right to left and applied bold, went to the 2nd
line of text and highlighted from right to left and applied italic.
Unhighlighted the text and set the caret to the end of the 2nd line and drag
select to the left, then selected the italic icon, the text was reset to normal.
Ninoschka can you still repro this?
| Reporter | ||
Comment 10•25 years ago
|
||
Build 2001-05-04-04: WinMe
Build 2001-05-04-08: Mac 9.04
It seems to be working much better now so maybe we should mark this as wfm.
Comment 11•25 years ago
|
||
great news! I'm marking as wfm, if this happens again, please reopen
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•