Closed
Bug 792420
Opened 13 years ago
Closed 13 years ago
Toolbar menu shouldn't allow its text to be selected
Categories
(Firefox for Android Graveyard :: Reader View, defect)
Tracking
(firefox21 verified)
VERIFIED
FIXED
Firefox 19
| Tracking | Status | |
|---|---|---|
| firefox21 | --- | verified |
People
(Reporter: ibarlow, Assigned: jwir3)
Details
Attachments
(2 files)
|
205.33 KB,
image/png
|
Details | |
|
3.05 KB,
patch
|
wesj
:
review+
|
Details | Diff | Splinter Review |
Even though the menu is built in html, we shouldn't be allowing text selection to work on it. See screenshot
| Assignee | ||
Updated•13 years ago
|
Assignee: nobody → sjohnson
| Assignee | ||
Updated•13 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
| Assignee | ||
Updated•13 years ago
|
OS: All → Android
Hardware: All → ARM
| Assignee | ||
Comment 1•13 years ago
|
||
Attachment #674012 -
Flags: review?(wjohnston)
Comment 2•13 years ago
|
||
Comment on attachment 674012 [details] [diff] [review]
b792420
Review of attachment 674012 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/chrome/content/aboutReader.html
@@ +26,5 @@
> <li><a id="share-button" class="button share-button" href="#"></a></li>
> <ul class="dropdown">
> <li><a class="dropdown-toggle button style-button" href="#"></a></li>
> <li class="dropdown-popup">
> + <ul id="color-scheme-buttons" class="segmented-button" onmousedown="return false;"></ul>
What's this for? Remove it.
::: mobile/android/chrome/content/aboutReader.js
@@ +545,5 @@
>
> let item = doc.createElement("li");
> let link = doc.createElement("a");
> link.innerHTML = option.name;
> + link.style.MozUserSelect = 'none';
We should just put this in the CSS for about:reader:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/themes/core/aboutReader.css#445
It looks like we could get rid of this anchor element entirely tbh, and just put the text in the li element, but that's a separate bug I guess (I'm also not sure why this is dynamically generated at all).
Attachment #674012 -
Flags: review?(wjohnston) → review+
| Assignee | ||
Comment 3•13 years ago
|
||
(In reply to Wesley Johnston (:wesj) from comment #2)
> Comment on attachment 674012 [details] [diff] [review]
> What's this for? Remove it.
Ah yes, this was left over from when I was testing something else. I'll remove it.
> We should just put this in the CSS for about:reader:
Hm, so I tried putting the css rule in place. For some odd reason, it doesn't seem to have any effect, though. I tried placing -moz-user-select: none in the rules for the selector .segmented-button > li > a, with and without !important, as well as in a selector with just a, again with and without !important, and neither of them seem to have any effect. As a sanity check, I tried placing border: 1px solid red; in the same selector, and that takes effect as expected.
Is it possible I might be missing something here? Do I need to do something else to get the rule to translate into aElement.style.MozUserSelect?
> It looks like we could get rid of this anchor element entirely tbh, and just
> put the text in the li element, but that's a separate bug I guess (I'm also
> not sure why this is dynamically generated at all).
Submitted bug 805569 for this.
| Assignee | ||
Comment 4•13 years ago
|
||
(In reply to Scott Johnson (:jwir3) from comment #3)
> Is it possible I might be missing something here? Do I need to do something
> else to get the rule to translate into aElement.style.MozUserSelect?
Ok, I found this:
This does not have any affect on actual selection operation. This doesn't have any effect on content loaded as chrome, except in textboxes.
from https://developer.mozilla.org/en-US/docs/CSS/user-select
So, it looks like this CSS property isn't set because this is chrome. Should I just keep it in the JS then, since I'm really only using it as a flag to determine whether or not the selection should be allowed?
Comment 5•13 years ago
|
||
(In reply to Scott Johnson (:jwir3) from comment #4)
> (In reply to Scott Johnson (:jwir3) from comment #3)
> > Is it possible I might be missing something here? Do I need to do something
> > else to get the rule to translate into aElement.style.MozUserSelect?
>
> Ok, I found this:
>
> This does not have any affect on actual selection operation. This doesn't
> have any effect on content loaded as chrome, except in textboxes.
>
> from https://developer.mozilla.org/en-US/docs/CSS/user-select
>
> So, it looks like this CSS property isn't set because this is chrome. Should
> I just keep it in the JS then, since I'm really only using it as a flag to
> determine whether or not the selection should be allowed?
Sounds like a good plan.
| Assignee | ||
Comment 6•13 years ago
|
||
Target Milestone: --- → Firefox 19
Comment 7•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 8•12 years ago
|
||
This issue doesn't occur anymore on the latest Nightly. Closing bug as verified fixed on:
Firefox for Android
Version: 21.0a1 (2013-01-29)
Device: Galaxy R
OS: Android 2.3.4
status-firefox21:
--- → verified
Updated•12 years ago
|
Status: RESOLVED → VERIFIED
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•