Opened 12 years ago
Closed 12 years ago
#9851 closed Bug (fixed)
selectionChange isn't fired when mouse selection finished outside editable
Reported by: | Piotrek Koszuliński | Owned by: | Olek Nowodziński |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.0.2 |
Component: | Core : Selection | Version: | 3.5.1 |
Keywords: | Cc: |
Description
Extracted from #9699.
- Focus editor.
- Check that selection is collapsed so cut/copy buttons are disabled.
- Start selection by dragging. Release mouse button outside editable. Check releasing mouse button over document, outside of it, outside body, but in html.
- Check cut/copy buttons state.
- Expected: when selection changed from collapsed to not collapsed, then selectionChange should be fired and those buttons should change state.
- Actual: in many cases they stay disabled.
Reproducible on Webkits, Opera, FF. After #9699 some cases may be fixed - usually those target by that patch. But even when issue from #9699 was fixed, I was sometimes able to reproduce this one.
Change History (11)
comment:1 Changed 12 years ago by
comment:3 Changed 12 years ago by
Status: | new → confirmed |
---|---|
Version: | 4.0.1 (GitHub - master) → 3.5.1 |
I was able to reproduce this in all browsers from CKEditor 3.5.1 (when cut and copy buttons started reflected selection).
comment:4 Changed 12 years ago by
Owner: | set to Olek Nowodziński |
---|---|
Status: | confirmed → assigned |
comment:5 Changed 12 years ago by
Status: | assigned → review |
---|
Created a fix for the issue in t/9851@cksource that consists of two separate commits:
- Fixed clipboard mouseup listener to handle out-of-editable cases when selection goes out of editable.
- Fixed selection system to fire
selectionChange
event if selection process ends out of editable.
comment:6 Changed 12 years ago by
Status: | review → review_passed |
---|
comment:7 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed issue with git:b862b5f2dff723.
comment:8 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
git:b862b5f2dff723 changeset breaks clipboard behavior for divarea:
- Open divarea sample.
- Watch cut & copy buttons on the toolbar.
- Click somewhere outside of the editor.
- Cut & copy are enabled as if something was selected in the editor.
This is because checkSelectionChangeTimeout
is now called when clicking the outer document.
Cannot reproduce in framed editor.
comment:9 Changed 12 years ago by
Status: | reopened → review |
---|
Created branch t/9851b@cksource with clipboard fix. Apparently, selection type should be determined by calling editor.getSelection().getType()
.
comment:10 Changed 12 years ago by
Status: | review → review_passed |
---|
comment:11 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with git:bcb07200a76f6b
Most likely on #9699 this issue is reproducible only when elements path hasn't been modified by the selection change. So to reproduce it select the same paragraph in which you placed caret in step 1.