Opened 12 years ago
Last modified 9 years ago
#9361 review_failed Bug
Context menu not displayed in correct position when invoked using keyboard shortcut (Shift + F10 or application key)
Reported by: | Satya Minnekanti | Owned by: | Olek Nowodziński |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Context Menu | Version: | 4.0 |
Keywords: | IBM | Cc: | Damian, Teresa Monahan, irinauru@… |
Description (last modified by )
To reproduce the defect:
- Open Massive inline editing sample
- Click inside any div & press Shift + Control + F10 to open Context menu.
Expected Result: Context menu opens & displayed next to current cursor position
Actual Result: Context menu opens but displayed at top left hand corner of browser. but if we use Application key Context menu displays next to current cursor position.
- Open iframe based sample (replacebycode)
- Click inside text somewhere in the middle & press Shift + Control + F10 to open Context menu.
Context menu opens in upper left corner of editor (iframed page)
Change History (22)
comment:1 Changed 12 years ago by
Milestone: | → CKEditor 4.0.1 |
---|---|
Status: | new → confirmed |
comment:3 Changed 12 years ago by
comment:4 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Summary: | Inline editing: Context menu not displayed in correct position when invoked using keyboard shortcut (Shift + Control + F10) → Context menu not displayed in correct position when invoked using keyboard shortcut (Shift + Control + F10) |
comment:5 follow-up: 6 Changed 12 years ago by
comment:6 Changed 12 years ago by
Replying to j.swiderski:
@satya both SHIFT+F10 and SHIFT+CRTL+F10 work in editor - my bad.
The problem is that menu position is always upper left corner when using SHIFT+CRTL+F10
NOTES:
#9574 #9575 #9576 are all valid bugs (if SHIFT+F10 is allowed in CKE 4.0)
As for my last comment, I have opened new ticket for it - #9583.
@j.swiderski look at the Accessibility Instructions dialog(To get it press Alt + Zero by keeping cursor in Editor body), It says Press SHIFT+CTRL+F10 to open Editor Context Menu.
comment:7 Changed 12 years ago by
Docs are one thing, how it currently works is another. CKEditor 3.x has written SHIFT+F10 a11yhelp while both options works there (With some exceptions - E.g. chrome).
Perhaps this is backwards compatibility.
Would be nice if someone else from CKSource team could comment on it.
comment:8 Changed 12 years ago by
Component: | General → UI : Context Menu |
---|---|
Owner: | set to Garry Yao |
Status: | confirmed → review |
Opened review 5acb03c for the contextmenu opening position.
comment:9 Changed 12 years ago by
Status: | review → review_failed |
---|
Issues:
- Chrome - for collapsed selection menu is opened in left top corner of the viewport.
- IE9 - for image selection menu is opened in left top corner of the viewport.
- Opera - compilation of two previous issues - doesn't work on collapsed selection and on image.
- There's a typo: https://github.com/ckeditor/ckeditor-dev/commit/5acb03c#commitcomment-2256684.
comment:10 Changed 12 years ago by
I closed #9538 and #9574 as DUPs of this issue. This one should target all cases - context menu on image, collapsed, !collapsed selections on all browsers when opening context menu with SHIFT+F10 or Application keys. Only if that won't be possible to fix all these cases at once we'll create ticket chosen cases.
comment:11 Changed 12 years ago by
Summary: | Context menu not displayed in correct position when invoked using keyboard shortcut (Shift + Control + F10) → Context menu not displayed in correct position when invoked using keyboard shortcut (Shift + F10 or application key) |
---|
comment:12 Changed 12 years ago by
Detailed issues list (on git:5acb03c)
- Chrome+Firefox+Opera, opening by app key on selected image with float:right - incorrect place.
- Chrome, opening by shift+f10 on collapsed selection - incorrect place (unstable - depends on place in text - sometimes it works).
- Firefox, opening by app key on not collapsed selection - incorrect place.
- Firefox, opening by shift+f10 opens also native context menu.
- IE9, opening by app key - always incorrect place.
- IE9, opening by shift+f10 on image - incorrect place.
- Opera, opening by shift+f10 on selected image with float:right - incorrect place.
- Opera, opening by shift+f10 on collapsed selection - incorrect place.
- Opera, opening by shift+f10 sometimes opens only native context menu.
I saw in some tickets that some of these cases cannot be fixed because of browsers' issues, but it'd be nice to have list of all of them in one place.
comment:13 Changed 12 years ago by
Owner: | changed from Garry Yao to Olek Nowodziński |
---|---|
Status: | review_failed → assigned |
comment:14 follow-up: 15 Changed 12 years ago by
Status: | assigned → review |
---|
Rebased branch on latest master.
Pushed tiny fix commit that provides fair functionality for Chrome, latest Firefox and IE8. Moreover:
- Firefox 3.x: Browser doesn't support
getClientRects
andgetBoundingClientRect
on range objects. These work with DOM elements but range support has been implemented in 4.x. The only reasonable (yet dirty) fix is complete editable cloning, dummy element insertion and calculating position. - Opera:
selection.getNative()
is broken. Sometimeseditor.getSelection().getNative() != editor.document.getWindow().$.getSelection()
. Also some issues withgetClientRects
andgetBoundingClientRect
. - IE10: Feature broken with floated image (error thrown).
- IE9: Weird implementation of
getClientRects
andgetBoundingClientRect
. - IE7: Rects work but menu positioning is broken.
Anyway:
- Possible bug in core/selection.
=
instead of==
?
I don't we think we can have this feature working on all browsers if we consider the variety of issues. We can try to fix them one-by-one and at least bring accessibility to IE9.
comment:15 Changed 12 years ago by
Replying to a.nowodzinski:
Possible bug in core/selection.
=
instead of==
?
return ( this._.cache.nativeSel = isMSSelection ? this.document.$.selection : this.document.getWindow().$.getSelection() );
It's ok - this is intended assignment, not a broken comparison.
PS. there's a coding style issue in https://github.com/cksource/ckeditor-dev/commit/fd35c9e43c83d711357ebc6e011a1c563086cbc2#L0R163
comment:16 Changed 12 years ago by
Status: | review → review_failed |
---|
This is still pretty broken. I can't even find what was fixed on t/9361 - I see similar (equally unstable) results on master.
In my opinion, if it's impossible to fix majority of cases by decent, readable and maintainable patch, then it's a waste of time. I'd rather go different way - IMO it's better to open context menu always in the top left corner or centre of the viewport unless it's opened by mouse right click. At least it will be predictable.
comment:17 Changed 12 years ago by
Milestone: | CKEditor 4.0.1 |
---|
This issue revealed to be way too complex too deal with, with minimal evident benefits. We'll take more time to discuss further about the real need of it as well as for having a clear evidence of the need to have it fixed.
comment:18 Changed 12 years ago by
Cc: | irinauru@… added |
---|
It is especially bad when you have a large amount of content in the editor for example: when autogrow is enabled or in the Massive inline editing sample.
Steps to reproduce:
- Open Massive inline editing or autogrow samples.
- Enter enough content in an editor so that editor grows larger than the current view port and the top of the editor goes off screen.
- Use the keyboard shortcut to open the context menu: Ctrl+Shift+F10
Problem:
Context menu can not be seen. Focus goes to the context menu and user is not aware of this.
comment:19 Changed 12 years ago by
#10531 was marked as duplicate.
From CKE 4.0 context menu appears outside of content area.
comment:22 Changed 11 years ago by
I think that it's impossible to open ctx menu using keyboard on Mac without some tinkering: http://superuser.com/questions/662175/context-menu-right-click-keyboard-shortcut-in-mac-os-x
comment:23 Changed 9 years ago by
I think that it's impossible to open ctx menu using keyboard on Mac without some tinkering: http://superuser.com/questions/662175/context-menu-right-click-keyboard-shortcut-in-mac-os-x
I'm not sure what I meant by this comment because now I'm able to open the ctx menu using Shift+F10 (may need Fn to be pressed as well) in Chrome@MacOS.
Edit: It was a temporary lack of caffeine in the blood. Of course Shift+F10 won't open the native context menu.
Replying to j.swiderski:
@j.swiderski I would deny them bcoz..In all the defects #9574 #9575 #9576 you mentioned to use Shift+F10 to open Editor Context menu, but we have to use Shift + Control + F10 in 4.0.. So then i would say all your defects are invalid.