-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[staging] Fix tinymce ctrl-s #27519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[staging] Fix tinymce ctrl-s #27519
Conversation
PR for joomla#16550 The tinymce save plugin doesnt work in joomla and instead of just doing nothing it discards edited article instead of saving it This PR stops loading the save plugin so now if you press ctr-s you will just get any dialog your browser has set. Most importantly it does not result in you losing work
|
@wilsonge I can port this super simple change to j4 if you dont want to have to deal with a merge |
|
I have tested this item ✅ successfully on 5dd7cf7 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27519. |
1 similar comment
|
I have tested this item ✅ successfully on 5dd7cf7 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27519. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27519. |
|
@brianteeman at one point in the very first version of atum @dgrammatiko had the control + s actually saving the article. I'd rather get that functionality restored again than doing a direct port of removing the save plugin for j4 (obviously this is fine for j3) |
|
even that pr requires this patch to work I wanted to update that PR to use https://github.com/github/hotkey which is much more powerful but struggled with the "import" |
|
I was reluctant on the es6 approach back in the days because what we have is a bastard between modern and legacy js. That project (the es6 transition) was never actually completed. In sort you cannot use import without a bundled like Webpack or rollup... |
|
:( thats a shame because #24152 is restricted to using regular modifier keys and they always conflict |
|
@brianteeman nope, that's fixable, eg: if (e.altKey && e.which == 83) {
e.preventDefault();
var toolbar = document.getElementById("toolbar-apply");
toolbar.getElementsByClassName("button-apply")[0].click();
};and change the event to fire PS. FWIW that code should be part of the toolbar CE js not another random js file |
|
I dont want to do e.preventDefault(); as I consider it a bad idea to replace existing hotkeys - they might not be coming just from the browser (hint screenreaders) and thats why github, gmail etc all use a different modifier. (I can do it easily with mousetrap but you wouldnt let me) |
Let me disagree here. You try to cover cases that nobody actually asked for and probably will be used by a minority of the users. You are making this thing one more plugin. Did anyone counted how many plugins J4 is introducing? |
|
rofl says the man who introduced hundreds of javascript files |
You do understand that you comment is irrelevant. Did I actually brought to the project a deprecated/outdated script like the one from eBay or the mousetrap that you mentioned above? No. So please... |
|
Is it just me or does this feature keep getting broken in J4? |
|
It only got broken once. and then never fixed. so not keep getting broken no :P |
|
It never worked in joomla 3 |
|
The original report was in June 2017 |
|
That plugin rightfully needs to be removed: This PR has nothing to do with the My 2c |
|
Just merge this and get on with it |
|
Having discussed the use of custom keys and/or modifying keys used by the browser with Bruce regarding accessibility it was deemed to be a bad idea to change the expected behaviour of a browser |
|
Thanks! |

PR for #16550
The tinymce save plugin doesnt work in joomla and instead of just doing nothing it discards edited article instead of saving it
This PR stops loading the save plugin so now if you press ctr-s you will just get any dialog your browser has set. Most importantly it does not result in you losing work