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

Demos: Cannot highlight, copy code shown in "View Source" popup using Chrome #7856

Closed
gabrielschulhof opened this Issue Nov 27, 2014 · 10 comments

Comments

Projects
None yet
4 participants
@gabrielschulhof
Contributor

gabrielschulhof commented Nov 27, 2014

This worked in 1.3.2.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Nov 27, 2014

Contributor

Actually, it worked as late as 1.4.4.

Contributor

gabrielschulhof commented Nov 27, 2014

Actually, it worked as late as 1.4.4.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Nov 27, 2014

Contributor

OK, so it seems our fix for #7533 caused this regression. Wow!

Contributor

gabrielschulhof commented Nov 27, 2014

OK, so it seems our fix for #7533 caused this regression. Wow!

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Nov 27, 2014

Contributor

This seems to be a Chrome bug. The absence of tabindex="0" on the popup container seems to cause it not to allow highlighting. I'll try to produce a minimal test case without jQM to file against Chrome.

Contributor

gabrielschulhof commented Nov 27, 2014

This seems to be a Chrome bug. The absence of tabindex="0" on the popup container seems to cause it not to allow highlighting. I'll try to produce a minimal test case without jQM to file against Chrome.

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Nov 27, 2014

Contributor

OK, so the difference kind of appears in FF as well. In 1.4.4, you could highlight just the code snippet, but in 1.4.5 you can only highlight the code snippet + line numbers + heading - probably because the heading gets the focus.

Contributor

gabrielschulhof commented Nov 27, 2014

OK, so the difference kind of appears in FF as well. In 1.4.4, you could highlight just the code snippet, but in 1.4.5 you can only highlight the code snippet + line numbers + heading - probably because the heading gets the focus.

@arschmitz

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Jan 9, 2015

Member

Reopening based on #7907 as we may want to look at this more closely

Member

arschmitz commented Jan 9, 2015

Reopening based on #7907 as we may want to look at this more closely

@arschmitz arschmitz reopened this Jan 9, 2015

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Jan 9, 2015

Contributor

@arschmitz this is happening because we no longer set the tabindex on the popup container. It needs to be done per-application, because if we set it wholesale, we risk re-introducing the blue focus flash on Android.

Contributor

gabrielschulhof commented Jan 9, 2015

@arschmitz this is happening because we no longer set the tabindex on the popup container. It needs to be done per-application, because if we set it wholesale, we risk re-introducing the blue focus flash on Android.

@arschmitz

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Jan 9, 2015

Member

I would say disabling all text selection in popups is a much more serious bug then a blue flash. And not something that it would be expected for a developer to have to manage.

Member

arschmitz commented Jan 9, 2015

I would say disabling all text selection in popups is a much more serious bug then a blue flash. And not something that it would be expected for a developer to have to manage.

@suewonjp

This comment has been minimized.

Show comment
Hide comment
@suewonjp

suewonjp Jan 26, 2016

Hello.

Today, I copied some source code via that "View Source" button from jQuery mobile demo site, and then I pasted the demo source code to my html file for some testing purpose.

Here two problems:

  1. couldn't select text with press-down on Safari (not a serious problem, I think...)
  2. could select text by double-clicking, and could copy them, but...
    • _The problem is some invisible non-ascii characters got sliped in the copied text. (This is serious in my opinion)_
    • This non-ascii characters caused some weird layout problem in my test with Phonegap on Android device, Chrome browser.
    • This caused me a significant debugging time!!! :-(

I don't know why those non-ascii characters are included there, but I think it's true other people like me may waste some time with this issue...

Can you raise up your priority to fix this issue? (The 2nd problem, especially...)

Thanks,

Hello.

Today, I copied some source code via that "View Source" button from jQuery mobile demo site, and then I pasted the demo source code to my html file for some testing purpose.

Here two problems:

  1. couldn't select text with press-down on Safari (not a serious problem, I think...)
  2. could select text by double-clicking, and could copy them, but...
    • _The problem is some invisible non-ascii characters got sliped in the copied text. (This is serious in my opinion)_
    • This non-ascii characters caused some weird layout problem in my test with Phonegap on Android device, Chrome browser.
    • This caused me a significant debugging time!!! :-(

I don't know why those non-ascii characters are included there, but I think it's true other people like me may waste some time with this issue...

Can you raise up your priority to fix this issue? (The 2nd problem, especially...)

Thanks,

@apsdehal

This comment has been minimized.

Show comment
Hide comment
@apsdehal

apsdehal Jan 28, 2016

Member

@suewonjp Can you specify the exact browser, its version and specific widget from where you copied the source?

Member

apsdehal commented Jan 28, 2016

@suewonjp Can you specify the exact browser, its version and specific widget from where you copied the source?

@suewonjp

This comment has been minimized.

Show comment
Hide comment
@suewonjp

suewonjp Jan 28, 2016

First of all, the layout glitch looks like so:

jqm-issue-7856

I could reproduce the issue on either of Safari 9.0.3 on OS X Mavericks or Chrome 4.4 on Android.

What I did was:

  1. Go to http://demos.jquerymobile.com/1.4.5/navbar/
  2. click the View Source button (under the 3 item navbar)
  3. double click anywhere on the popup to select the entire text
  4. copy the code
  5. then, the whitespace portion of the copied code contains \xA0 which is non-ascii
    • of course, the characters are invisible. you need hex editor or something.
  6. Removing the non-ascii has made the layout look normal.

Here's the test html file made of the code copied with the above procedure, thus containing a bunch of \xA0

test.html.zip

First of all, the layout glitch looks like so:

jqm-issue-7856

I could reproduce the issue on either of Safari 9.0.3 on OS X Mavericks or Chrome 4.4 on Android.

What I did was:

  1. Go to http://demos.jquerymobile.com/1.4.5/navbar/
  2. click the View Source button (under the 3 item navbar)
  3. double click anywhere on the popup to select the entire text
  4. copy the code
  5. then, the whitespace portion of the copied code contains \xA0 which is non-ascii
    • of course, the characters are invisible. you need hex editor or something.
  6. Removing the non-ascii has made the layout look normal.

Here's the test html file made of the code copied with the above procedure, thus containing a bunch of \xA0

test.html.zip

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