Closed Bug 1123067 Opened 10 years ago Closed 10 years ago

"addEventLister" and "user-select: none"

Categories

(Core :: DOM: Events, defect)

35 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: abolfazl.ziaratban, Assigned: MatsPalmgren_bugz)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: regression, site-compat)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.2; rv:35.0) Gecko/20100101 Firefox/35.0 Build ID: 20150108202552 Steps to reproduce: keys ← ↑ ↓ → not be work when using "user-select: none". http://jsfiddle.net/b6Lb96h1/ Actual results: in new version 35.0 my project after update(to 35.0) moz not be work
Component: Untriaged → DOM: Events
Product: Firefox → Core
Regression from bug 739396 maybe?
(In reply to Mats Palmgren (:mats) from comment #1) > Regression from bug 739396 maybe? Looks like it broke earlier. Still narrowing this down further...
(In reply to :Gijs Kruitbosch from comment #2) > (In reply to Mats Palmgren (:mats) from comment #1) > > Regression from bug 739396 maybe? > > Looks like it broke earlier. Still narrowing this down further... I get to eat my words - sorry, I seem to have made a mistake in my testing. Re-testing, and yes, it might be this bug.
Blocks: 739396
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 8 → All
Hardware: x86 → All
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=152ef25e89ae&tochange=98ea98c8191a So yeah, bug 739396 seems plausible. Note that even before bug 739396, in the testcase the reporter linked to, I don't seem able to navigate to the part of the div past the <br>. I'm not sure why.
Assignee: nobody → mats
ooops ! this is a bug or not ?
(In reply to Mats Palmgren (:mats) from comment #1) > Regression from bug 739396 maybe? thanks. because in last version of moz this be work correctly. but in new version of moz my project does not work! I'm wrong? or this is a bug ?
Yes, I think this is a bug and I'm working on a fix. Meanwhile, can you tell us a little bit about your project and what you are using "user-select: none" for? (It's good for us to know how features are used so we can make sure we don't break those use cases.)
Flags: needinfo?(abolfazl.ziaratban)
i am a php programmer and me have not enough about client programmer(js,css,html and etc ...) But I know a little bit of everything(js,css,html and etc ...). i using "user-select" for private console program in my project and this is like cmd in windows (only like). for example user(or admin) cannot be selected or drag of text.
Flags: needinfo?(abolfazl.ziaratban)
Attached patch part 1, fixSplinter Review
This allows us to have a caret inside a user-select:none editable node.
Attachment #8556715 - Flags: review?(bugs)
thanks you Mats :)
Comment on attachment 8556715 [details] [diff] [review] part 1, fix I'm probably missing something here... Why always append aItem. Don't we want to check if aItem is collapsed and only then add it?
Attachment #8556715 - Flags: review?(bugs) → review-
Comment on attachment 8556715 [details] [diff] [review] part 1, fix (In reply to Olli Pettay [:smaug] from comment #12) > Why always append aItem. Don't we want to check if aItem is collapsed and > only then add it? If we requiring aItem to be collapsed the bug would still occur for Shift+Arrow etc. While that seems like an extreme edge case, I don't see any reason to not fix it in the same way. In general, the caret is at the end of the range whether it is collapsed or not. That's why I think collapsing and adding the range is the right behavior in an editable, but non-selectable, context.
Attachment #8556715 - Flags: review- → review?(bugs)
well shift+arrow shouldn't work, right? shift+arrow should extent the current selection and if it doesn't do that, why should selection move?
> well shift+arrow shouldn't work, right? Fair enough. It seems like a separate bug though, and in the meanwhile I think this behavior is reasonable.
Comment on attachment 8556715 [details] [diff] [review] part 1, fix This is weird but fine.
Attachment #8556715 - Flags: review?(bugs) → review+
(Filed bug 1128730 to follow-up on comment 14 / 15)
Blocks: 1128730
Depends on: 1129205
I disabled the bug1123067-1.html part of the test (not super-important anyway) and re-landed: https://hg.mozilla.org/integration/mozilla-inbound/rev/b9692dccd0e7 https://hg.mozilla.org/integration/mozilla-inbound/rev/b3630a0f5b0d Filed bug 1129205 on re-enabling that test.
No longer depends on: 1129205
Flags: needinfo?(mats)
Depends on: 1129205
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: