If you sort a table by a column, you cannot remove that sorting on a Mac. Ctrl+Click opens the context menu instead. The only way is to delete entries from phpmyadmin.pma__table_uiprefs, then log out and log back in again.
Tested on PMA 4.3.0 in both Chrome and Firefox (Mac OSX Yosemite 10.10.1) with the same result.
DisgruntledGoat,
would it make sense to use Command+click ? If so, can you make a test?
The patch for 4.3.2:
diff --git a/js/multi_column_sort.js b/js/multi_column_sort.js
index 9fc4c1b..bb4083d 100644
--- a/js/multi_column_sort.js
+++ b/js/multi_column_sort.js
@@ -59,7 +59,7 @@ function removeColumnFromMultiSort(target, parent)
AJAX.registerOnload('keyhandler.js', function () {
$("th.draggable.column_heading.pointer.marker a").on('click', function (eve
var url = $(this).parent().find('input').val();
event.preventDefault();
url = removeColumnFromMultiSort(url, $(this).parent());
if (url) {
I'm testing with Firefox at the moment.
I tried that patch and encountered some strange behavior. For a brief moment, it seems to work -- then the page appears to reload with the original order. Prior to the refresh, I could actually see the unordered SQL query, but the page refreshes almost immediately. At first I thought this was because command-click is normally the "open link in a new tab" shortcut.
I think perhaps option-click is a better solution here. According to this, the option key is
altKey, but I do not believe that is true. The 'option' key is dual-purpose, 'option' by itself is a different keystroke than shift-option which is really 'alt'. I'd prefer to leave this on the un-shifted 'option' keystroke;altKeyrefers to the shifted 'alt' keystroke. When I tested, the shift-alt keystroke was required when the code referred toaltKey.Five minutes of web searching has not resulted in me finding the proper keyword to refer to the un-shifted 'option' key. Furthermore, testing at https://api.jquery.com/keydown/#target shows the only difference between what I would consider 'option' and 'alt' is that
shiftKeyis true for 'alt' but false for 'option' -- both showkey: AltandkeyCode: 18.Isaac,
do you get the same results with Chrome?
Yes, I've now tested with Chrome, Firefox, and Safari and all three have the same behavior.
altKeyrefers to the key combination shift-option in all three browsers tested. Forcing the user to press two keys at the same time is not unheard of but doesn't seem ideal to me.Hope that helps.
Isaac,
yes that helps a lot. In these browsers, did you try a variation of the patch:
if (event.ctrlKey || event.altKey) {
to see if the behavior is correct?
Even if it's not ideal, what other choice do we have? If we adopt it, it would be a matter of advertising the new key combination in the hint and changing the "if" statement as stated above.
Yes, I did try that variation.
The only better solution I can think of is if we can determine when the option key is pressed without using shift. I haven't been able to find that solution yet, so I'm not sure it's possible. It may be a modifier key that doesn't register a keypress event. I would say if I can't find find a better solution by this afternoon that we should go ahead with the
event.ctrlKey || event.altKeysolution.We should then modify the tooltip text, I propose
Alt+click (on Mac that is the shift+option keys) to remove...Do you mean to replace ctrl+click also on non-Mac machines?
I tested in Windows 7 (Firefox 31 and IE 11) and altKey is triggered by Alt+Shift.
Last edit: Marc Delisle 2014-12-15
That is how my tooltip sounds, but that is because I didn't consider that when writing it. No, I do not wish to replace ctrl-click.
So the text could possibly become:
Ctrl+click or alt+click to remove...or
Ctrl+click (Mac users shift+alt+click) to remove...About the second choice, is the alt key meaningful for Mac users? Reading your previous remark, I was under the impression that "option" was the name of this key.
Well, technically it has both words on it, but I agree with you that 'option' is a better choice if using the second choice.
How about this?
Ctrl+Click or Alt+Click (Mac: Shift+Option+Click) to remove column from ORDER BY clause
Yes, I agree with this proposal.
Mac users who know how to produce Alt will understand when reading Alt+Click, and those who don't will understand later when reading Shift+Option+Click.
Fix: https://github.com/phpmyadmin/phpmyadmin/commit/33654763ece6bda7367bb5420dd9835fa14906b6