Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !7463

Fix for: Tapping away from tooltip does not close tooltip on mobiles/tablets

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/kdimatteo/master into master 12 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: kdimatteo

Set this to use touchstart and touchend events (ala mouseover), with treatments for the iOS copy/paste window.

fixes https://github.com/twitter/bootstrap/issues/7300

Compare
  • master (base)

and
  • latest version
    49c45723
    1 commit, 2 years ago

1 file
+ 7
- 2

    Preferences

    File browser
    Compare changes
js/bootstrap-tooltip.js
+ 7
- 2
  • View file @ 49c45723


@@ -54,8 +54,8 @@
if (trigger == 'click') {
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
} else if (trigger != 'manual') {
eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
eventIn = trigger == 'hover' ? 'mouseenter' : 'focus touchstart'
eventOut = trigger == 'hover' ? 'mouseleave' : 'blur touchend'
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
}
@@ -64,6 +64,11 @@
this.options.selector ?
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
this.fixTitle()
//suppress iOS copy/pase menu appearing on touchhold events
this.$element.css("webkit-touch-callout", "none").css("webkit-user-select", "none");
}
, getOptions: function (options) {
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
1
js
1
js
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Administrator
Reference: twbs/bootstrap!7463
Source branch: github/fork/kdimatteo/master

Menu

Explore Projects Groups Snippets