admin-page-framework icon indicating copy to clipboard operation
admin-page-framework copied to clipboard

Error: Select input entry with shortcut in metabox

Open patrickf0 opened this issue 11 years ago • 6 comments

On an options page it is possible to select the whole input within a text, textarea, image etc. by using shortcut cmd+a(mac) or ctrl+a (win).

But in a meta Box it is not possible, double click on mouse button isn´t working either.

patrickf0 avatar Apr 28 '14 13:04 patrickf0

I cannot confirm it in my environment. Does it happen in the demo plugin?

michaeluno avatar Apr 28 '14 23:04 michaeluno

Yes its in the Demo Plugin as well... I´m using Chrome Browser by the way...

patrickf0 avatar May 06 '14 15:05 patrickf0

It works here.

apf_selecting_text

michaeluno avatar May 06 '14 16:05 michaeluno

mmh okay... when I hit cmd+a nothing happens...

double click on the mouse works

It´s not a big problem though.

patrickf0 avatar May 06 '14 16:05 patrickf0

Just recently commented on your blog, but (afterwards) figured it made more sense to continue this discussion here.

Am having problems selecting text in textareas and input fields with pre-existing text in Edit Pages for CPTs created by the Admin Page Framework. Not having problems with inputs or textarea in the WP default Posts or Pages.

What’s stranger is I seem to be getting inconsistent results across the three browsers that I used. In Chrome, I can select text both with the mouse and with keyboard shortcuts (ctrl+a, for example). Chrome works perfectly. In Firefox, I cannot select text with the mouse, but keyboard shortcuts are working. With IE, neither the mouse nor the keyboard shortcuts are working.

With IE, it is still possible to modify the value in textareas using the arrow keys, keyboard characters, and the delete/backspace buttons, but even after modifying the field value, selecting text proves impossible.

As a quick follow-up, I was very recently surprised to discover that cursor placement using the mouse worked on both IE and Firefox on the mobile view for the Edit {CPT} Page.

I noticed that when the browser shrinks, the draggable attribute for the Excerpt metabox (ie, the parent of a textarea) switches to false.
Manually switching draggable to 'false' using the FF web developer tools returns the textarea to normal functionality. For IE it returns the ability to use the mouse to position the cursor, but it still remains impossible for me to drag to select text or use keyboard shortcuts to select text.

I don't know whether it's worth reopening the issue over this, but if you're keen to have a look, Micheal, I'll grant you access to my Admin area to see if you can confirm this behaviour/posit a solution.

pcraig3 avatar Oct 17 '14 22:10 pcraig3

As a quick follow-up, I was very recently surprised to discover that cursor placement using the mouse worked on both IE and Firefox on the mobile view for the Edit {CPT} Page.

That's something surprises me to hear that too.

You may check if the problem occurs with the development branch v3.3.0b. There was an issue that the 'textarea' value is not escaped in v3.2.1 and it is fixed in v3.3.0b. So you may try the development version (download).

I don't know whether it's worth reopening the issue over this, but if you're keen to have a look, Micheal, I'll grant you access to my Admin area to see if you can confirm this behaviour/posit a solution.

I'd be happy to. You know my email address. (In case, you lost it, you can find it in the git commit log.)

michaeluno avatar Oct 18 '14 07:10 michaeluno