Skip to content
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

[4] Hide up/down selector arrows on HTML5 Number textboxes #30885

Closed
PhilETaylor opened this issue Oct 2, 2020 · 7 comments
Closed

[4] Hide up/down selector arrows on HTML5 Number textboxes #30885

PhilETaylor opened this issue Oct 2, 2020 · 7 comments

Comments

@PhilETaylor
Copy link
Contributor

Steps to reproduce the issue

Throughout Joomla 4 there are input boxes of type="number" - this correctly, in browsers, provided an up and down selector arrow.

However, a lot of the number boxes Joomla uses for readonly data - and Joomla 4 disables these textboxes to show the user they cannot be modifies.

However, disabling a textbox of type="number" doesn't remove the up/down arrows, and could lead to confusion that these numbers can be changed, indeed the browser shows visual feedback when they are clicked, even though the number doesn't change.

A VERY quick google shows me that the arrows CAN be hidden by CSS easily, and thus applied if a textbox of type="number" is disabled.

https://www.w3schools.com/howto/howto_css_hide_arrow_number.asp

Expected result

Same as actual result, but without the browser added up and down arrows on disabled fields.

Actual result

Screenshot 2020-10-02 at 20 14 03

System information (as much as possible)

safari on mac

Additional comments

@PhilETaylor PhilETaylor changed the title [4] Hide up/down selector arrows on HTML5 Number textbooks [4] Hide up/down selector arrows on HTML5 Number textboxes Oct 2, 2020
@brianteeman
Copy link
Contributor

We should not override native html5

@PhilETaylor

This comment was marked as abuse.

@PhilETaylor

This comment was marked as abuse.

@brianteeman
Copy link
Contributor

On a disabled/readonly field the arrows do not appear at all in
Chrome Windows
Edge Windows

They do appear on Firefox

@Quy
Copy link
Contributor

Quy commented Jun 10, 2021

A possible fix is to change the type attribute to text. Revision is an integer yet it is specified as a text.

		<field
			name="version"
			type="text"
			label="COM_CONTENT_FIELD_VERSION_LABEL"
			size="6"
			class="readonly"
			readonly="true"
			filter="unset"
		/> 

30885

@PhilETaylor

This comment was marked as abuse.

@PhilETaylor

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants