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

form-control: missing cursor if switching off readonly on dblclick [Chrome+Safari] #16022

Closed
DenysVuika opened this issue Mar 9, 2015 · 16 comments

Comments

@DenysVuika
Copy link

The issue can be observed here: jsfiddle
Was reproduced with Chrome 41.

Description: when switching off 'readonly' state of the input.form-control on the fly (via dblclick event) element stops showing text caret, however user can still type text. The issue is not reproduced for standard input controls without form-control class (see jsfidlle link above).

@twbs-lmvtfy
Copy link

Hi @DenisVuyka!

You appear to have posted a live example (https://fiddle.jshell.net/dvuyka/htua4ugm/show/light/), which is always a good first step. However, according to the HTML5 validator, your example has some validation errors, which might potentially be causing your issue:

  • line 52, column 73: Bad value true for attribute readonly on element input.
  • line 57, column 52: Bad value true for attribute readonly on element input.

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!

(Please note that this is a fully automated comment.)

@DenysVuika
Copy link
Author

The example was updated with readonly="readonly", this does affect the issue though.

@cvrebert
Copy link
Collaborator

cvrebert commented Mar 9, 2015

Reposting so as to trigger the validator again: https://jsfiddle.net/dvuyka/htua4ugm/

@twbs-lmvtfy
Copy link

Hi @cvrebert!

You appear to have posted a live example (https://fiddle.jshell.net/dvuyka/htua4ugm/show/light/), which is always a good first step. However, according to Bootlint, your example has some Bootstrap usage errors, which might potentially be causing your issue:

  • line 12, column 3: W013: Bootstrap version might be outdated. Latest version is at least 3.3.2 ; saw what appears to be usage of Bootstrap 3.2.0
  • line 13, column 3: W013: Bootstrap version might be outdated. Latest version is at least 3.3.2 ; saw what appears to be usage of Bootstrap 3.2.0

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!

(Please note that this is a fully automated comment.)

@cvrebert
Copy link
Collaborator

cvrebert commented Mar 9, 2015

Corrected to use latest Bootstrap: https://jsfiddle.net/w16tvcp2/2/

@cvrebert
Copy link
Collaborator

cvrebert commented Mar 9, 2015

OS X Safari is also affected.

@cvrebert
Copy link
Collaborator

cvrebert commented Mar 9, 2015

Simplified testcase: https://jsfiddle.net/f8utvj06/2/
Apparently this somehow relates to outline...

@DenysVuika
Copy link
Author

@cvrebert Thanks for simplified scenario. I've noticed that control starts working when setting "outline: -2px;". I guess this is something to be fixed at 'form-control' side.

@cvrebert
Copy link
Collaborator

cvrebert commented Mar 9, 2015

@cvrebert
Copy link
Collaborator

cvrebert commented Mar 9, 2015

Discovered a different Firefox bug in the course of investigating your bug; reported it as https://bugzilla.mozilla.org/show_bug.cgi?id=1141011

@cvrebert cvrebert changed the title form-control: wrong behavior if switching off readonly on dblclick (Chrome) form-control: wrong behavior if switching off readonly on dblclick [Chrome+Safari] Mar 9, 2015
@cvrebert
Copy link
Collaborator

cvrebert commented Mar 9, 2015

@cvrebert
Copy link
Collaborator

cvrebert commented Mar 9, 2015

Note that this isn't outline:0-specific. Chrome has the same problem with #input1:focus { outline: 5px solid red; }.
@mdo Any thoughts?

@cvrebert cvrebert changed the title form-control: wrong behavior if switching off readonly on dblclick [Chrome+Safari] form-control: missing cursor if switching off readonly on dblclick [Chrome+Safari] Mar 9, 2015
@zacechola
Copy link

These need to be added to the wall of bugs, @cvrebert?

@cvrebert
Copy link
Collaborator

cvrebert commented Mar 9, 2015

@zacechola The Chrome bug, yes. The others aren't Bootstrap-specific.

cvrebert added a commit that referenced this issue Mar 10, 2015
[skip sauce]
[skip validator]
cvrebert added a commit that referenced this issue Mar 10, 2015
@mdo
Copy link
Member

mdo commented Mar 28, 2015

Anything left to do here?

@cvrebert
Copy link
Collaborator

@mdo Unless you happen to know some relevant CSS magic or were to think this bug is more important than the custom :focus outline, I think this is CantFix/WontFix due to underlying browser bugs.

@mdo mdo closed this as completed Mar 28, 2015
krissihall pushed a commit to krissihall/bootstrap that referenced this issue May 21, 2015
* tag 'v3.3.4' of https://github.com/twbs/bootstrap: (281 commits)
  full grunt
  BootstrapCDN: v3.3.2 => v3.3.4
  Sass: v3.3.3 => v3.3.4
  v3.3.2 => v3.3.4
  Clarify that role="button" is required for dismiss-on-next-click popovers
  automatic `grunt dist`
  Bump bootstrap-sass download link to Sass-specific v3.3.3
  automatic `grunt dist`
  Run `grunt`.
  Bump devDependencies.
  Document that .progress-bar-striped doesn't work in IE<=9; fixes twbs#16058
  automatic `grunt dist`
  Remove trailing whitespace in forms.less
  Fixed proper navigation element selection on backward scrolling (from the bottom to the top)
  automatic `grunt dist`
  Increment quick start options to five
  Add Wall of Browser Bugs entry for twbs#16022
  automatic grunt dist
  automatic grunt dist
  Affix: $('body') => $(document.body)
  ...
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

5 participants